function MigrateDrupal7AuditIdsTest::testAllMigrationsWithNoIdConflicts
Same name in other branches
- 9 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::testAllMigrationsWithNoIdConflicts()
- 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::testAllMigrationsWithNoIdConflicts()
- 11.x core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::testAllMigrationsWithNoIdConflicts()
Tests all migrations with no ID conflicts.
File
-
core/
modules/ migrate_drupal/ tests/ src/ Kernel/ d7/ MigrateDrupal7AuditIdsTest.php, line 101
Class
- MigrateDrupal7AuditIdsTest
- Tests the migration auditor for ID conflicts.
Namespace
Drupal\Tests\migrate_drupal\Kernel\d7Code
public function testAllMigrationsWithNoIdConflicts() : void {
$migrations = $this->container
->get('plugin.manager.migration')
->createInstancesByTag('Drupal 7');
// Audit the IDs of all Drupal 7 migrations. There should be no conflicts
// since no content has been created.
$results = (new IdAuditor())->auditMultiple($migrations);
/** @var \Drupal\migrate\Audit\AuditResult $result */
foreach ($results as $result) {
$this->assertInstanceOf(AuditResult::class, $result);
$this->assertTrue($result->passed());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.