X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=vendor%2Fdoctrine%2Form%2Ftests%2FDoctrine%2FTests%2FORM%2FFunctional%2FTicket%2FDDC949Test.php;fp=vendor%2Fdoctrine%2Form%2Ftests%2FDoctrine%2FTests%2FORM%2FFunctional%2FTicket%2FDDC949Test.php;h=a3734b75ae7323663f7a27858da42b1e602213dc;hb=8b04b2d11798dee4f3e1358e4f43e97a6df851f6;hp=0000000000000000000000000000000000000000;hpb=73568cf05a785a45f94ca3f2351d9e07bf917958;p=zf2.biz%2Fapplication_blanche.git diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php new file mode 100644 index 0000000..a3734b7 --- /dev/null +++ b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC949Test.php @@ -0,0 +1,43 @@ +useModelSet('generic'); + parent::setUp(); + } + + /** + * @group DDC-949 + */ + public function testBooleanThroughRepository() + { + $true = new BooleanModel(); + $true->booleanField = true; + + $false = new BooleanModel(); + $false->booleanField = false; + + $this->_em->persist($true); + $this->_em->persist($false); + $this->_em->flush(); + $this->_em->clear(); + + $true = $this->_em->getRepository('Doctrine\Tests\Models\Generic\BooleanModel')->findOneBy(array('booleanField' => true)); + $false = $this->_em->getRepository('Doctrine\Tests\Models\Generic\BooleanModel')->findOneBy(array('booleanField' => false)); + + $this->assertInstanceOf('Doctrine\Tests\Models\Generic\BooleanModel', $true, "True model not found"); + $this->assertTrue($true->booleanField, "True Boolean Model should be true."); + + $this->assertInstanceOf('Doctrine\Tests\Models\Generic\BooleanModel', $false, "False model not found"); + $this->assertFalse($false->booleanField, "False Boolean Model should be false."); + } +} \ No newline at end of file