PHP Classes

File: tests/unit/Sql/WhereTest.php

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

Contents

Class file image Download
<?php

class Sql_WhereTest extends UnitTestCase {
   
    function
whereUp() {
    }
   
    function
TearDown() {
    }
   
    function
testEmptyStringReturnsEmpty() {
       
$where = new A_Sql_Where();
       
$this->assertEqual($where->render(), '');
    }
 
    function
testSql_LogicallistArrayOneElement() {
       
$where = new A_Sql_Where();
        
$this->assertEqual($where->addExpression(array('foo'=>'bar'))->render(), " WHERE (foo = 'bar')");
    }
   
    function
testSql_LogicallistArrayTwoElements() {
       
$where = new A_Sql_Where();
        
$this->assertEqual($where->addExpression(array('foo'=>'bar', 'faz'=>'baz'))->render(), " WHERE (foo = 'bar' AND faz = 'baz')");
    }
   
}