changes after code review
This commit is contained in:
parent
03523c67d5
commit
60beca3760
@ -93,7 +93,7 @@ class LazyCriteriaCollection extends AbstractLazyCollection implements Selectabl
|
|||||||
return $this->collection->isEmpty();
|
return $this->collection->isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->count() == 0;
|
return !$this->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,6 +111,13 @@ class LazyCriteriaCollectionTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($this->lazyCriteriaCollection->isEmpty());
|
$this->assertTrue($this->lazyCriteriaCollection->isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testIsEmptyIsFalseIfCountIsNotZero()
|
||||||
|
{
|
||||||
|
$this->persister->expects($this->once())->method('count')->with($this->criteria)->will($this->returnValue(1));
|
||||||
|
|
||||||
|
$this->assertFalse($this->lazyCriteriaCollection->isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
public function testIsEmptyUsesWrappedCollectionWhenInitialized()
|
public function testIsEmptyUsesWrappedCollectionWhenInitialized()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user