Add missing methods to the mock
This commit is contained in:
parent
7551b1ad00
commit
632382b069
@ -161,7 +161,7 @@ abstract class AbstractEntityPersister implements CachedEntityPersister
|
||||
*/
|
||||
public function getCountSQL($criteria = array())
|
||||
{
|
||||
return $this->persister->count($criteria);
|
||||
return $this->persister->getCountSQL($criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,7 @@ use Closure;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\Common\Collections\Selectable;
|
||||
use Doctrine\ORM\Persisters\BasicEntityPersister;
|
||||
|
||||
/**
|
||||
@ -31,7 +32,7 @@ use Doctrine\ORM\Persisters\BasicEntityPersister;
|
||||
* @since 2.5
|
||||
* @author Michaël Gallego <mic.gallego@gmail.com>
|
||||
*/
|
||||
class LazyCriteriaCollection implements Collection
|
||||
class LazyCriteriaCollection implements Collection, Selectable
|
||||
{
|
||||
/**
|
||||
* @var BasicEntityPersister
|
||||
@ -354,4 +355,13 @@ class LazyCriteriaCollection implements Collection
|
||||
$this->collection = new ArrayCollection($elements);
|
||||
$this->initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function matching(Criteria $criteria)
|
||||
{
|
||||
$this->initialize();
|
||||
return $this->collection->matching($criteria);
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase
|
||||
'getInserts',
|
||||
'getInsertSQL',
|
||||
'getSelectSQL',
|
||||
'getCountSQL',
|
||||
'expandParameters',
|
||||
'expandCriteriaParameters',
|
||||
'getSelectConditionStatementSQL',
|
||||
@ -66,6 +67,7 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase
|
||||
'load',
|
||||
'loadById',
|
||||
'loadOneToOneEntity',
|
||||
'count',
|
||||
'refresh',
|
||||
'loadCriteria',
|
||||
'loadAll',
|
||||
@ -435,4 +437,4 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase
|
||||
|
||||
$this->assertNull($persister->exists($entity, array()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user