|
@@ 73-85 (lines=13) @@
|
| 70 |
|
|
| 71 |
|
$previousSlice = []; |
| 72 |
|
|
| 73 |
|
foreach ($objectsByIteration as $i => $objects) { |
| 74 |
|
$offset = $objects[0] - 1; |
| 75 |
|
|
| 76 |
|
$this->sliceFetcher->expects($this->at($i)) |
| 77 |
|
->method('fetch') |
| 78 |
|
->with($queryBuilder, $batchSize, $offset, $previousSlice, ['id']) |
| 79 |
|
->will($this->returnValue($objects)); |
| 80 |
|
|
| 81 |
|
$this->objectManager->expects($this->at($i)) |
| 82 |
|
->method('clear'); |
| 83 |
|
|
| 84 |
|
$previousSlice = $objects; |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
$this->objectPersister->expects($this->exactly(count($objectsByIteration))) |
| 88 |
|
->method('insertMany'); |
|
@@ 121-131 (lines=11) @@
|
| 118 |
|
|
| 119 |
|
$providerInvocationOffset = 2; |
| 120 |
|
|
| 121 |
|
foreach ($objectsByIteration as $i => $objects) { |
| 122 |
|
$offset = $objects[0] - 1; |
| 123 |
|
|
| 124 |
|
$provider->expects($this->at($providerInvocationOffset + $i)) |
| 125 |
|
->method('fetchSlice') |
| 126 |
|
->with($queryBuilder, $batchSize, $offset) |
| 127 |
|
->will($this->returnValue($objects)); |
| 128 |
|
|
| 129 |
|
$this->objectManager->expects($this->at($i)) |
| 130 |
|
->method('clear'); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
$this->objectPersister->expects($this->exactly(count($objectsByIteration))) |
| 134 |
|
->method('insertMany'); |