Fixes after review
This commit is contained in:
parent
3d69c08b5a
commit
f834499a2c
|
@ -33,3 +33,6 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.4...v3.1.0
|
||||||
that property while transforming. Combined with the above POST_TRANSFORM event
|
that property while transforming. Combined with the above POST_TRANSFORM event
|
||||||
developers can now create calculated dynamic properties on Elastica documents
|
developers can now create calculated dynamic properties on Elastica documents
|
||||||
for indexing. #794
|
for indexing. #794
|
||||||
|
* Added a `SliceFetcher` abstraction for Doctrine providers that get more
|
||||||
|
information about the previous slice allowing for optimising queries during
|
||||||
|
population. #725
|
||||||
|
|
|
@ -10,8 +10,15 @@ use FOS\ElasticaBundle\Provider\IndexableInterface;
|
||||||
|
|
||||||
abstract class AbstractProvider extends BaseAbstractProvider
|
abstract class AbstractProvider extends BaseAbstractProvider
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var SliceFetcherInterface
|
||||||
|
*/
|
||||||
|
private $sliceFetcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ManagerRegistry
|
||||||
|
*/
|
||||||
protected $managerRegistry;
|
protected $managerRegistry;
|
||||||
protected $sliceFetcher;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
|
@ -178,14 +178,14 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
||||||
$nbObjects = 1;
|
$nbObjects = 1;
|
||||||
$objects = array(1);
|
$objects = array(1);
|
||||||
|
|
||||||
$provider = $this->getMockAbstractProvider();
|
$provider = $this->getMockAbstractProvider(true);
|
||||||
|
|
||||||
$provider->expects($this->any())
|
$provider->expects($this->any())
|
||||||
->method('countObjects')
|
->method('countObjects')
|
||||||
->will($this->returnValue($nbObjects));
|
->will($this->returnValue($nbObjects));
|
||||||
|
|
||||||
$provider->expects($this->any())
|
$this->sliceFetcher->expects($this->any())
|
||||||
->method('fetchSlice')
|
->method('fetch')
|
||||||
->will($this->returnValue($objects));
|
->will($this->returnValue($objects));
|
||||||
|
|
||||||
$this->indexable->expects($this->any())
|
$this->indexable->expects($this->any())
|
||||||
|
|
Loading…
Reference in a new issue