1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/EnumTestCase.php
2006-09-22 08:07:49 +00:00

27 lines
803 B
PHP

<?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);
}
}
?>