$reader->
expects(static::
once())->
method('read'
)->
willReturn([ ['id' => 'id1', 'name' => 'foo'
],
['id' => 'id2', 'name' => 'baz'
],
['id' => 'id3', 'name' => 'bar'
],
]);
$writer =
$this->
createMock(AbstractWriter::
class);
$writer->
expects(static::
never())->
method('append'
);
$pipe =
$this->
createMock(AbstractPipe::
class);
$pipe->
expects(static::
never())->
method('in'
);
$pipe->
expects(static::
exactly(3
))->
method('out'
)->
willReturnOnConsecutiveCalls([ 'id1' =>
['id' => 'id1', 'name' => 'foo'
],
],
[ 'id2' =>
['id' => 'id2', 'name' => 'baz'
],
],
[ 'id3' =>
['id' => 'id3', 'name' => 'bar'
],
]);
$logEntity =
new ImportExportLogEntity();
$logEntity->
assign([ 'id' => Uuid::
randomHex(),
'activity' => ImportExportLogEntity::ACTIVITY_IMPORT,