1
0
mirror of synced 2024-12-13 06:46:03 +03:00

added boolean test case

This commit is contained in:
pookey 2006-09-22 08:07:49 +00:00
parent 222724f7b3
commit a1bed77af2
2 changed files with 29 additions and 1 deletions

26
tests/EnumTestCase.php Normal file
View File

@ -0,0 +1,26 @@
<?php
class Doctrine_EnumTestCase extends Doctrine_UnitTestCase {
public function prepareData() { }
public function prepareTables() {
$this->tables = array("EnumTest");
parent::prepareTables();
}
public function testSet() {
$test = new EnumTest();
$test->status = 'open';
$this->assertEqual($test->status, 'open');
$test->save();
$query = new Doctrine_Query($this->connection);
$ret = $query->query('FROM EnumTest WHERE EnumTest.status = ?', array('open'));
$this->assertEqual(count($ret), 1);
$query = new Doctrine_Query($this->connection);
$ret = $query->query('FROM EnumTest WHERE EnumTest.status = "open"');
$this->assertEqual(count($ret), 1);
}
}
?>

View File

@ -25,10 +25,11 @@ require_once("FilterTestCase.php");
require_once("ValueHolderTestCase.php");
require_once("QueryLimitTestCase.php");
require_once("QueryReferenceModelTestCase.php");
require_once("DBTestCase.php");
//require_once("DBTestCase.php");
require_once("SchemaTestCase.php");
require_once("ImportTestCase.php");
require_once("BooleanTestCase.php");
require_once("EnumTestCase.php");
error_reporting(E_ALL);
@ -85,6 +86,7 @@ $test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase());
$test->addTestCase(new Doctrine_BooleanTestCase());
$test->addTestCase(new Doctrine_EnumTestCase());
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase());