$nonexistent_id_values =
[];
for ($i = 1;
$i <=
$num_destination_fields;
$i++
) { $row["destid
$i"
] = "destination_id_value_
$i";
$destination_id_values["destination_id_property_
$i"
] = "destination_id_value_
$i";
$nonexistent_id_values["destination_id_property_
$i"
] = "nonexistent_destination_id_value_
$i";
$this->destinationIds
["destination_id_property_
$i"
] =
[];
} $row['source_ids_hash'
] =
$this->
getIdMap()->
getSourceIdsHash($source_ids_values);
$this->
saveMap($row);
$id_map =
$this->
getIdMap();
// Test for a valid hit.
$source_id =
$id_map->
lookupSourceId($destination_id_values);
$this->
assertSame($expected_result,
$source_id);
// Test for a miss.
$source_id =
$id_map->
lookupSourceId($nonexistent_id_values);
$this->
assertCount(0,
$source_id);
} /**
* Tests currentDestination() and currentSource().
*/
public function testCurrentDestinationAndSource() { // Simple map with one source and one destination ID.