only in patch2: unchanged: --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php @@ -178,6 +178,21 @@ public function testMigrateUpgrade() { $this->assertSession()->pageTextNotContains(t('Destination module not found for migration_provider_test')); // Ensure there are no errors about any other missing migration providers. $this->assertSession()->pageTextNotContains(t('module not found')); + + // Test the available migration paths. + $all_available = $this->getAvailablePaths(); + foreach ($all_available as $available) { + $this->assertSession()->elementExists('xpath', '//table[@id="edit-available-module-list-module-list"]//td[text()="' . $available . '"]'); + $this->assertSession()->elementNotExists('xpath', '//table[@id="edit-missing-module-list"]//td[text()="' . $available . '"]'); + } + + // Test the missing migration paths. + $all_missing = $this->getMissingPaths(); + foreach ($all_missing as $missing) { + $this->assertSession()->elementExists('xpath', '//table[@id="edit-missing-module-list"]//td[text()="' . $missing . '"]'); + $this->assertSession()->elementNotExists('xpath', '//table[@id="edit-available-module-list-module-list"]//td[text()="' . $missing . '"]'); + } + $this->drupalPostForm(NULL, [], t('Perform upgrade')); $this->assertText(t('Congratulations, you upgraded Drupal!')); @@ -259,4 +274,19 @@ protected function translatePostValues(array $values) { */ abstract protected function getEntityCounts(); + /** + * Gets the available upgrade paths. + * + * @return int[] + * An array of expected counts keyed by entity type ID. + */ + abstract protected function getAvailablePaths(); + + /** + * Gets the missing upgrade paths. + * + * @return int[] + * An array of expected counts keyed by entity type ID. + */ + abstract protected function getMissingPaths(); } only in patch2: unchanged: --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php @@ -76,6 +76,72 @@ protected function getEntityCounts() { } /** + * {@inheritdoc} + */ + public function getAvailablePaths() { + return [ + 'block', + 'comment', + 'contact', + 'content', + 'date', + 'dblog', + 'email', + 'entityreference', + 'file', + 'filefield', + 'filter', + 'i18ntaxonomy', + 'image', + 'imagecache', + 'imagefield', + 'link', + 'list', + 'menu', + 'node', + 'node_reference', + 'number', + 'options', + 'optionwidgets', + 'path', + 'phone', + 'profile', + 'search', + 'system', + 'taxonomy', + 'text', + 'upload', + 'user', + 'user_reference', + ]; + } + + /** + * {@inheritdoc} + */ + public function getMissingPaths() { + return [ + 'aggregator', + 'book', + 'date_api', + 'date_timezone', + 'event', + 'i18n', + 'i18nblocks', + 'i18ncck', + 'i18ncontent', + 'i18nmenu', + 'i18nprofile', + 'i18nstrings', + 'imageapi', + 'locale', + 'php', + 'translation', + 'variable_admin', + ]; + } + + /** * Executes all steps of migrations upgrade. */ public function testMigrateUpgrade() { only in patch2: unchanged: --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php @@ -82,6 +82,74 @@ protected function getEntityCounts() { } /** + * {@inheritdoc} + */ + public function getAvailablePaths() { + return [ + 'block', + 'comment', + 'contact', + 'date', + 'dblog', + 'email', + 'entityreference', + 'field', + 'field_sql_storage', + 'file', + 'filefield', + 'filter', + 'image', + 'imagefield', + 'link', + 'list', + 'menu', + 'node', + 'node_reference', + 'number', + 'options', + 'optionwidgets', + 'path', + 'phone', + 'search', + 'shortcut', + //'simpletest', + 'system', + 'taxonomy', + 'text', + //'update', + 'user', + 'user_reference', + ]; + } + + /** + * {@inheritdoc} + */ + public function getMissingPaths() { + return [ + 'aggregator', + 'blog', + 'book', + 'color', + 'contextual', + 'date_api', + 'entity', + 'field_ui', + 'forum', + 'help', + 'locale', + 'php', + 'rdf', + 'statistics', + 'syslog', + 'toolbar', + 'tracker', + 'translation', + 'trigger', + ]; + } + + /** * Executes all steps of migrations upgrade. */ public function testMigrateUpgrade() {