1
0
mirror of synced 2025-01-19 06:51:40 +03:00

DDC-1394 - Enhance test to verify

This commit is contained in:
Benjamin Eberlei 2011-10-15 09:57:35 +02:00
parent 4a920d0aad
commit 894bbb020c

View File

@ -37,6 +37,10 @@ class TypeTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals(0.1515, $decimal->highScale); $this->assertEquals(0.1515, $decimal->highScale);
} }
/**
* @group DDC-1394
* @return void
*/
public function testBoolean() public function testBoolean()
{ {
$bool = new BooleanModel(); $bool = new BooleanModel();
@ -46,7 +50,7 @@ class TypeTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->flush(); $this->_em->flush();
$this->_em->clear(); $this->_em->clear();
$dql = "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b"; $dql = "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = true";
$bool = $this->_em->createQuery($dql)->getSingleResult(); $bool = $this->_em->createQuery($dql)->getSingleResult();
$this->assertTrue($bool->booleanField); $this->assertTrue($bool->booleanField);
@ -56,7 +60,7 @@ class TypeTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->flush(); $this->_em->flush();
$this->_em->clear(); $this->_em->clear();
$dql = "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b"; $dql = "SELECT b FROM Doctrine\Tests\Models\Generic\BooleanModel b WHERE b.booleanField = false";
$bool = $this->_em->createQuery($dql)->getSingleResult(); $bool = $this->_em->createQuery($dql)->getSingleResult();
$this->assertFalse($bool->booleanField); $this->assertFalse($bool->booleanField);