Add test for QueryBuilderTest::addCriteria with undefined limits
This commit is contained in:
parent
1c2f2b5c13
commit
2aba7fb374
1 changed files with 12 additions and 0 deletions
|
@ -412,6 +412,18 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
$this->assertEquals(10, $qb->getMaxResults());
|
||||
}
|
||||
|
||||
public function testAddCriteriaUndefinedLimit()
|
||||
{
|
||||
$qb = $this->_em->createQueryBuilder();
|
||||
$qb->setFirstResult(2)->setMaxResults(10);
|
||||
$criteria = new Criteria();
|
||||
|
||||
$qb->addCriteria($criteria);
|
||||
|
||||
$this->assertEquals(2, $qb->getFirstResult());
|
||||
$this->assertEquals(10, $qb->getMaxResults());
|
||||
}
|
||||
|
||||
public function testGetQuery()
|
||||
{
|
||||
$qb = $this->_em->createQueryBuilder()
|
||||
|
|
Loading…
Add table
Reference in a new issue