1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/EnumTestCase.php

27 lines
800 B
PHP
Raw Normal View History

2006-09-22 12:07:49 +04:00
<?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);
2006-09-27 01:32:00 +04:00
$ret = $query->query('FROM EnumTest WHERE EnumTest.status = ?', array('open'));
2006-09-22 12:07:49 +04:00
$this->assertEqual(count($ret), 1);
$query = new Doctrine_Query($this->connection);
2006-09-27 01:32:00 +04:00
$ret = $query->query('FROM EnumTest WHERE EnumTest.status = open');
2006-09-22 12:07:49 +04:00
$this->assertEqual(count($ret), 1);
}
}
?>