Fix AbstractProvider tests
This commit is contained in:
parent
2437a098ba
commit
f6264f4149
|
@ -54,6 +54,11 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
|||
->with($queryBuilder)
|
||||
->will($this->returnValue($nbObjects));
|
||||
|
||||
$this->indexable->expects($this->any())
|
||||
->method('isObjectIndexable')
|
||||
->with('index', 'type', $this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$providerInvocationOffset = 2;
|
||||
|
||||
foreach ($objectsByIteration as $i => $objects) {
|
||||
|
@ -106,6 +111,11 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
|||
->method('fetchSlice')
|
||||
->will($this->returnValue($objects));
|
||||
|
||||
$this->indexable->expects($this->any())
|
||||
->method('isObjectIndexable')
|
||||
->with('index', 'type', $this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$this->objectManager->expects($this->never())
|
||||
->method('clear');
|
||||
|
||||
|
@ -127,6 +137,11 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
|||
->method('fetchSlice')
|
||||
->will($this->returnValue($objects));
|
||||
|
||||
$this->indexable->expects($this->any())
|
||||
->method('isObjectIndexable')
|
||||
->with('index', 'type', $this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$loggerClosureInvoked = false;
|
||||
$loggerClosure = function () use (&$loggerClosureInvoked) {
|
||||
$loggerClosureInvoked = true;
|
||||
|
@ -154,6 +169,11 @@ class AbstractProviderTest extends \PHPUnit_Framework_TestCase
|
|||
->method('fetchSlice')
|
||||
->will($this->returnValue($objects));
|
||||
|
||||
$this->indexable->expects($this->any())
|
||||
->method('isObjectIndexable')
|
||||
->with('index', 'type', $this->anything())
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$this->objectPersister->expects($this->any())
|
||||
->method('insertMany')
|
||||
->will($this->throwException($this->getMockBulkResponseException()));
|
||||
|
|
Loading…
Reference in a new issue