diff --git a/core/modules/content_translation/migrations/state/content_translation.migrate_drupal.yml b/core/modules/content_translation/migrations/state/content_translation.migrate_drupal.yml index 13705b949c439c8a88413538a374b740d7f97ede..88f81a63460899f01d1c420ee243ee843b87259a 100644 --- a/core/modules/content_translation/migrations/state/content_translation.migrate_drupal.yml +++ b/core/modules/content_translation/migrations/state/content_translation.migrate_drupal.yml @@ -29,12 +29,19 @@ not_finished: i18n: content_translation # Taxonomy term references. i18ntaxonomy: content_translation + # Node revision translations. + # https://www.drupal.org/project/drupal/issues/2746541 + node: content_translation 7: # @TODO: Move to finished when remaining Drupal 7 i18n issues are resolved. # See https://www.drupal.org/project/drupal/issues/2208401 i18n: content_translation - # menu links. + # Menu links. + # See https://www.drupal.org/project/drupal/issues/3008028 i18n_menu: content_translation # Migrate taxonomy term references # https://www.drupal.org/project/drupal/issues/3035392 i18n_taxonomy: content_translation + # Node revision translations. + # https://www.drupal.org/project/drupal/issues/2746541 + node: content_translation diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b525dbdb726cee9c5a9331ccacc1a42cdd48178a --- /dev/null +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\Tests\migrate_drupal\Kernel\d6; + +use Drupal\Tests\migrate_drupal\Traits\ValidateMigrationStateTestTrait; + +/** + * Tests the migration state information in module.migrate_drupal.yml. + * + * @group migrate_drupal + */ +class ValidateMigrationStateTest extends MigrateDrupal6TestBase { + + use ValidateMigrationStateTestTrait; + + /** + * {@inheritdoc} + */ + public static $modules = [ + // Test migrations states. + 'migrate_state_finished_test', + 'migrate_state_not_finished_test', + ]; + +} diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fcab11450ac8e1697d0dabc3042d430eb333e687 --- /dev/null +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php @@ -0,0 +1,25 @@ +<?php + +namespace Drupal\Tests\migrate_drupal\Kernel\d7; + +use Drupal\Tests\migrate_drupal\Traits\ValidateMigrationStateTestTrait; + +/** + * Tests the migration state information in module.migrate_drupal.yml. + * + * @group migrate_drupal + */ +class ValidateMigrationStateTest extends MigrateDrupal7TestBase { + + use ValidateMigrationStateTestTrait; + + /** + * {@inheritdoc} + */ + public static $modules = [ + // Test migrations states. + 'migrate_state_finished_test', + 'migrate_state_not_finished_test', + ]; + +} diff --git a/core/modules/migrate_drupal/tests/src/Kernel/ValidateMigrationStateTest.php b/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php similarity index 91% rename from core/modules/migrate_drupal/tests/src/Kernel/ValidateMigrationStateTest.php rename to core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php index 63dc79d79acf8efe6a3c6655f07bd92d072afefa..bb4f5fb282f5b288f23885066248cc769e60feda 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/ValidateMigrationStateTest.php +++ b/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\Tests\migrate_drupal\Kernel; +namespace Drupal\Tests\migrate_drupal\Traits; use Drupal\Component\Discovery\YamlDiscovery; use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait; @@ -15,24 +15,10 @@ * * @group migrate_drupal */ -class ValidateMigrationStateTest extends MigrateDrupalTestBase { +trait ValidateMigrationStateTestTrait { use FileSystemModuleDiscoveryDataProviderTrait; - /** - * {@inheritdoc} - */ - public static $modules = [ - // Test migrations states. - 'migrate_state_finished_test', - 'migrate_state_not_finished_test', - ]; - - /** - * Level separator of destination and source properties. - */ - const SEPARATOR = ','; - /** * Tests the migration information in .migrate_drupal.yml. * @@ -43,6 +29,10 @@ class ValidateMigrationStateTest extends MigrateDrupalTestBase { * migrations are not needed. */ public function testMigrationState() { + + // Level separator of destination and source properties. + $separator = ','; + $this->enableAllModules(); // Build an array for each migration keyed by provider. The value is a @@ -68,7 +58,7 @@ public function testMigrationState() { $destination_module = $migration->getDestinationPlugin() ->getDestinationModule(); - $discovered[$version][] = implode(static::SEPARATOR, [ + $discovered[$version][] = implode($separator, [ $version, $provider, $source_module, @@ -83,7 +73,7 @@ public function testMigrationState() { ->getDefinitions(); foreach ($definitions as $key => $definition) { foreach ($definition['core'] as $version) { - $discovered[$version][] = implode(static::SEPARATOR, [ + $discovered[$version][] = implode($separator, [ $version, $definition['provider'], $definition['source_module'], @@ -114,7 +104,7 @@ public function testMigrationState() { if (($source !== 'i18nstrings') && ($source !== 'i18n_string')) { foreach ((array) $destination as $dest) { $key = [$info_version, $module, $source, trim($dest)]; - $declared[$info_version][$state][] = implode(static::SEPARATOR, $key); + $declared[$info_version][$state][] = implode($separator, $key); } } } diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php index 5ea6badda698477e161bed31f8c5649fb35483b7..dc3a6d68eb9bebf53985169dbeceff95d779d151 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php @@ -109,7 +109,6 @@ protected function getAvailablePaths() { 'jquery_ui', 'link', 'menu', - 'node', 'nodeaccess', 'nodereference', 'number', @@ -159,6 +158,7 @@ protected function getMissingPaths() { 'i18nviews', 'locale', 'migrate_status_active_test', + 'node', 'views', ]; } diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php index a83527035ab82bf6322034cf8edf668535b9f953..046b4cecfed0b63823b0cb747e6d2da1240ea5d4 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php @@ -144,7 +144,6 @@ protected function getAvailablePaths() { 'imagecache', 'imagefield', 'menu', - 'node', 'nodereference', 'optionwidgets', 'path', @@ -180,6 +179,7 @@ protected function getMissingPaths() { 'i18nstrings', 'i18ntaxonomy', 'locale', + 'node', ]; } diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php index f86ba2547ad348de9c497ab40efb407f5dd58c3a..2e8b1b1c9ff6ed940c2a5f5522da2d3a0c776dc8 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php @@ -101,7 +101,6 @@ protected function getAvailablePaths() { 'list', 'locale', 'menu', - 'node', 'number', 'openid', 'options', @@ -169,6 +168,7 @@ protected function getMissingPaths() { 'i18n_translation', 'i18n_user', 'i18n_variable', + 'node', 'picture', 'migrate_status_active_test', 'variable', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php index 9827798d2abfd463cd8a357f5316527120b8287c..4e7e16c4e4ac06e747b0a40a8ff9cb2b985502e0 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php @@ -147,7 +147,6 @@ protected function getAvailablePaths() { 'link', 'list', 'menu', - 'node', 'number', 'options', 'path', @@ -188,6 +187,7 @@ protected function getMissingPaths() { 'i18n_taxonomy', 'i18n_translation', 'locale', + 'node', 'variable', 'variable_realm', 'variable_store',