1
0
mirror of synced 2025-03-09 14:26:13 +03:00

DDC-3065 - failing test - IN()-alike criteria should support NULL search values

This commit is contained in:
Marco Pivetta 2014-04-03 16:01:30 +02:00
parent da96f4938a
commit f2f571e4ab

View File

@ -928,5 +928,23 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$repository = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser');
$repository->find(array('username = ?; DELETE FROM cms_users; SELECT 1 WHERE 1' => 'test', 'id' => 1));
}
/**
* @group DDC-3056
*/
public function testFindByNullValueInInCondition()
{
$user = new CmsUser();
$user->username = 'ocramius';
$user->name = 'Marco';
$this->_em->persist($user);
$this->_em->flush();
$users = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser')->findBy(array('email' => array(null)));
$this->assertCount(1, $users);
}
}