Verifying that count on the lazy criteria collection is cached even with 0
count
This commit is contained in:
parent
c46b63f6b4
commit
546bb53ef9
@ -47,4 +47,13 @@ class LazyCriteriaCollectionTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertSame(10, $this->lazyCriteriaCollection->count());
|
||||
$this->assertSame(10, $this->lazyCriteriaCollection->count());
|
||||
}
|
||||
|
||||
public function testCountIsCachedEvenWithZeroResult()
|
||||
{
|
||||
$this->persister->expects($this->once())->method('count')->with($this->criteria)->will($this->returnValue(0));
|
||||
|
||||
$this->assertSame(0, $this->lazyCriteriaCollection->count());
|
||||
$this->assertSame(0, $this->lazyCriteriaCollection->count());
|
||||
$this->assertSame(0, $this->lazyCriteriaCollection->count());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user