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())
|
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\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\Common\Collections\Criteria;
|
use Doctrine\Common\Collections\Criteria;
|
||||||
|
use Doctrine\Common\Collections\Selectable;
|
||||||
use Doctrine\ORM\Persisters\BasicEntityPersister;
|
use Doctrine\ORM\Persisters\BasicEntityPersister;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,7 +32,7 @@ use Doctrine\ORM\Persisters\BasicEntityPersister;
|
|||||||
* @since 2.5
|
* @since 2.5
|
||||||
* @author Michaël Gallego <mic.gallego@gmail.com>
|
* @author Michaël Gallego <mic.gallego@gmail.com>
|
||||||
*/
|
*/
|
||||||
class LazyCriteriaCollection implements Collection
|
class LazyCriteriaCollection implements Collection, Selectable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var BasicEntityPersister
|
* @var BasicEntityPersister
|
||||||
@ -354,4 +355,13 @@ class LazyCriteriaCollection implements Collection
|
|||||||
$this->collection = new ArrayCollection($elements);
|
$this->collection = new ArrayCollection($elements);
|
||||||
$this->initialized = true;
|
$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',
|
'getInserts',
|
||||||
'getInsertSQL',
|
'getInsertSQL',
|
||||||
'getSelectSQL',
|
'getSelectSQL',
|
||||||
|
'getCountSQL',
|
||||||
'expandParameters',
|
'expandParameters',
|
||||||
'expandCriteriaParameters',
|
'expandCriteriaParameters',
|
||||||
'getSelectConditionStatementSQL',
|
'getSelectConditionStatementSQL',
|
||||||
@ -66,6 +67,7 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase
|
|||||||
'load',
|
'load',
|
||||||
'loadById',
|
'loadById',
|
||||||
'loadOneToOneEntity',
|
'loadOneToOneEntity',
|
||||||
|
'count',
|
||||||
'refresh',
|
'refresh',
|
||||||
'loadCriteria',
|
'loadCriteria',
|
||||||
'loadAll',
|
'loadAll',
|
||||||
@ -435,4 +437,4 @@ abstract class AbstractEntityPersisterTest extends OrmTestCase
|
|||||||
|
|
||||||
$this->assertNull($persister->exists($entity, array()));
|
$this->assertNull($persister->exists($entity, array()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user