From b8af2415042dd5e3ab8518b8a3ab8775c8dab56a Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 17 Oct 2011 20:53:04 +0200 Subject: [PATCH] Added a testcase for findBy(.. => null) and renamed 'old' testcase --- .../Tests/ORM/Functional/EntityRepositoryTest.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php index 7cd37b906..4f8e11420 100644 --- a/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php @@ -397,7 +397,7 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase /** * @group DDC-1087 */ - public function testIsNullCriteria() + public function testIsNullCriteriaDoesNotGenerateAParameter() { $repos = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser'); $users = $repos->findBy(array('status' => null, 'username' => 'romanb')); @@ -407,6 +407,16 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertEquals(array('romanb'), $params); } + public function testIsNullCriteria() + { + $this->loadFixture(); + + $repos = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser'); + + $users = $repos->findBy(array('status' => null)); + $this->assertEquals(1, count($users)); + } + /** * @group DDC-1094 */