$version =
$this->
getLegacyDrupalVersion($this->sourceDatabase
);
/** @var \Drupal\migrate\Plugin\Migration[] $all_migrations */
$all_migrations =
$plugin_manager->
createInstancesByTag('Drupal ' .
$version);
foreach ($all_migrations as $migration) { $id_map =
$migration->
getIdMap();
foreach ($id_map as $source_id =>
$map) { // Convert $source_id into a keyless array so that
// \Drupal\migrate\Plugin\migrate\id_map\Sql::getSourceHash() works as
// expected.
$source_id_values =
array_values(unserialize($source_id));
$row =
$id_map->
getRowBySource($source_id_values);
$destination =
serialize($id_map->
currentDestination());
$message = "Migration of
$source_id to
$destination as part of the {
$migration->
id()} migration. The source row status is " .
$row['source_row_status'
];
// A completed migration should have maps with
// MigrateIdMapInterface::STATUS_IGNORED or
// MigrateIdMapInterface::STATUS_IMPORTED.
$this->
assertNotSame(MigrateIdMapInterface::STATUS_FAILED,
$row['source_row_status'
],
$message);
$this->
assertNotSame(MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
$row['source_row_status'
],
$message);
} } } /**
* Creates an array of credentials for the Credential form.
*
* Before submitting to the Credential form the array must be processed by
* BrowserTestBase::translatePostValues() before submitting.
*
* @return array
* An array of values suitable for BrowserTestBase::translatePostValues().
*
* @see \Drupal\migrate_drupal_ui\Form\CredentialForm
*/