PHP Classes

File: tests/unit/Sql/ValuesTest.php

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

Contents

Class file image Download
<?php

class Sql_ValuesTest extends UnitTestCase {
   
    function
valuesUp() {
    }
   
    function
TearDown() {
    }
   
    function
testEmptyStringReturnsEmpty() {
       
$values = new A_Sql_Values('foo', 42);
       
$this->assertEqual($values->render(), '(foo) VALUES (42)');

       
$values = new A_Sql_Values(array('foo'=>42));
       
$this->assertEqual($values->render(), '(foo) VALUES (42)');

       
$values = new A_Sql_Values(array('foo'=>42, 'bar'=>'baz'));
       
$this->assertEqual($values->render(), "(foo, bar) VALUES (42, 'baz')");
    }
 
}