Commit a1bed77a authored by pookey's avatar pookey

added boolean test case

parent 222724f7
<?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"); ...@@ -25,10 +25,11 @@ require_once("FilterTestCase.php");
require_once("ValueHolderTestCase.php"); require_once("ValueHolderTestCase.php");
require_once("QueryLimitTestCase.php"); require_once("QueryLimitTestCase.php");
require_once("QueryReferenceModelTestCase.php"); require_once("QueryReferenceModelTestCase.php");
require_once("DBTestCase.php"); //require_once("DBTestCase.php");
require_once("SchemaTestCase.php"); require_once("SchemaTestCase.php");
require_once("ImportTestCase.php"); require_once("ImportTestCase.php");
require_once("BooleanTestCase.php"); require_once("BooleanTestCase.php");
require_once("EnumTestCase.php");
error_reporting(E_ALL); error_reporting(E_ALL);
...@@ -85,6 +86,7 @@ $test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase()); ...@@ -85,6 +86,7 @@ $test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase());
$test->addTestCase(new Doctrine_BooleanTestCase()); $test->addTestCase(new Doctrine_BooleanTestCase());
$test->addTestCase(new Doctrine_EnumTestCase());
//$test->addTestCase(new Doctrine_Cache_FileTestCase()); //$test->addTestCase(new Doctrine_Cache_FileTestCase());
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase()); //$test->addTestCase(new Doctrine_Cache_SqliteTestCase());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment