added boolean test case
This commit is contained in:
parent
222724f7b3
commit
a1bed77af2
26
tests/EnumTestCase.php
Normal file
26
tests/EnumTestCase.php
Normal 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);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user