->
shouldBeCalledTimes(1
);
// Assert that save is called.
$entity->
save() ->
shouldBeCalledTimes(1
);
// Set an id for the entity
$entity->
id() ->
willReturn(5
);
$destination->
setEntity($entity->
reveal());
// Ensure the id is saved entity id is returned from import.
$this->
assertEquals([5
],
$destination->
import(new Row()));
// Assert that import set the rollback action.
$this->
assertEquals(MigrateIdMapInterface::ROLLBACK_DELETE,
$destination->
rollbackAction());
} /**
* Tests row skipping when we can't get an entity to save.
*
* @covers ::import
*/
public function testImportEntityLoadFailure() { $bundles =
[];
$destination =
new EntityTestDestination([], '',
[],
$this->migration->
reveal(),