PHP Classes

File: tests/unit/Sql/GroupbyTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Sql/GroupbyTest.php   Download  
File: tests/unit/Sql/GroupbyTest.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: 853 bytes
 

Contents

Class file image Download
<?php

class Sql_GroupbyTest extends UnitTestCase {
   
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testEmptyStringColumnReturnsEmpty() {
       
$groupby = new A_Sql_Groupby();
       
$this->assertEqual($groupby->render(), '');
    }
 
    function
testSingleStringParameterColumn() {
       
$groupby = new A_Sql_Groupby('bar');
       
$this->assertEqual($groupby->render(), ' GROUP BY bar');
    }
 
    function
testMultipleStringParameterColumns() {
       
$groupby = new A_Sql_Groupby('foo', 'bar', 'fee');
       
$this->assertEqual($groupby->render(), ' GROUP BY foo, bar, fee');
    }
   
    function
testSingleArrayOfParameterColumns() {
       
$groupby = new A_Sql_Groupby(array('foo', 'bar'));
       
$this->assertEqual($groupby->render(), ' GROUP BY foo, bar');
    }
}