function MigrateUpgradeTestBase::assertIdConflict
Helper method that asserts text on the ID conflict form.
Parameters
\Drupal\Tests\WebAssert $session: The current session.
array $entity_types: An array of entity types
3 calls to MigrateUpgradeTestBase::assertIdConflict()
- IdConflictTest::testMigrateUpgradeExecute in core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ d6/ IdConflictTest.php - Tests ID Conflict form.
- IdConflictTest::testMigrateUpgradeExecute in core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ d7/ IdConflictTest.php - Tests ID Conflict form.
- MigrateUpgradeExecuteTestBase::testMigrateUpgradeExecute in core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ MigrateUpgradeExecuteTestBase.php - Executes all steps of migrations upgrade.
File
-
core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ MigrateUpgradeTestBase.php, line 199
Class
- MigrateUpgradeTestBase
- Provides a base class for testing migration upgrades in the UI.
Namespace
Drupal\Tests\migrate_drupal_ui\FunctionalCode
protected function assertIdConflict(WebAssert $session, array $entity_types) {
/** @var \Drupal\ $entity_type_manager */
$entity_type_manager = \Drupal::service('entity_type.manager');
$session->pageTextContains('WARNING: Content may be overwritten on your new site.');
$session->pageTextContains('There is conflicting content of these types:');
$this->assertNotEmpty($entity_types, 'No entity types provided to \\Drupal\\Tests\\migrate_drupal_ui\\Functional\\MigrateUpgradeTestBase::assertIdConflict()');
foreach ($entity_types as $entity_type) {
$label = $entity_type_manager->getDefinition($entity_type)
->getPluralLabel();
$session->pageTextContains($label);
}
$session->pageTextContainsOnce('content items');
$session->pageTextContains('There is translated content of these types:');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.