/**
* Tests the number of processed source rows.
*
* Scenarios to test for:
* - No processed rows.
* - One processed row.
* - Multiple processed rows.
*/
public function testProcessedCount() { $id_map =
$this->
getIdMap();
// Assert zero rows have been processed before adding rows.
$this->
assertSame(0,
$id_map->
processedCount());
$row_statuses =
[ MigrateIdMapInterface::STATUS_IMPORTED,
MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
MigrateIdMapInterface::STATUS_IGNORED,
MigrateIdMapInterface::STATUS_FAILED,
];
// Create a mapping row for each STATUS constant.
foreach ($row_statuses as $status) { $source =
['source_id_property' => 'source_value_' .
$status];
$row =
new Row($source,
['source_id_property' =>
[]]);
$destination =
['destination_id_property' => 'destination_value_' .
$status];