From a1bed77af29a7b641deaa5232324d5808928d990 Mon Sep 17 00:00:00 2001 From: pookey Date: Fri, 22 Sep 2006 08:07:49 +0000 Subject: [PATCH] added boolean test case --- tests/EnumTestCase.php | 26 ++++++++++++++++++++++++++ tests/run.php | 4 +++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/EnumTestCase.php diff --git a/tests/EnumTestCase.php b/tests/EnumTestCase.php new file mode 100644 index 000000000..a84eb448c --- /dev/null +++ b/tests/EnumTestCase.php @@ -0,0 +1,26 @@ +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); + + + } +} +?> diff --git a/tests/run.php b/tests/run.php index 4ae621985..a3074a03b 100644 --- a/tests/run.php +++ b/tests/run.php @@ -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());