PHP Classes

File: tests/unit/Sql/SetTest.php

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

Contents

Class file image Download
<?php

class Sql_SetTest extends UnitTestCase {
   
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testEmptyStringReturnsEmpty() {
       
$set = new A_Sql_Set();
       
$this->assertEqual($set->render(), '');
    }
 
    function
testOneExpression() {
       
$set = new A_Sql_Set();
       
$set->addExpression('foo', 42);
       
$this->assertEqual($set->render(), ' SET foo = 42');
    }
 
    function
testMultiExpression() {
       
$set = new A_Sql_Set();
       
$set->addExpression('foo >', 42);
       
$set->addExpression('bar', 'baz');
       
$this->assertEqual($set->render(), " SET foo > 42, bar = 'baz'");
    }
 
}