PHP Classes

File: tests/unit/Sql/ColumnsTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Sql/ColumnsTest.php   Download  
File: tests/unit/Sql/ColumnsTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 818 bytes
 

Contents

Class file image Download
<?php

class Sql_ColumnsTest extends UnitTestCase {
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testEmptyStringColumnReturnsEmpty() {
       
$columns = new A_Sql_Columns();
       
$this->assertEqual($columns->render(), '');
    }
 
    function
testSingleStringParameterColumn() {
       
$columns = new A_Sql_Columns('bar');
       
$this->assertEqual($columns->render(), 'bar');
    }
 
    function
testMultipleStringParameterColumns() {
       
$columns = new A_Sql_Columns('foo', 'bar', 'fee');
       
$this->assertEqual($columns->render(), 'foo, bar, fee');
    }
   
    function
testSingleArrayOfParameterColumns() {
       
$columns = new A_Sql_Columns(array('foo', 'bar'));
       
$this->assertEqual($columns->render(), 'foo, bar');
    }
}