diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php index e0b4175..7ca98b2 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php @@ -64,6 +64,21 @@ public function testGetDefinitions() { // All the plugins provided by core depend on migrate_drupal. $this->assertEmpty($migration_plugins); + // Enable a module that provides migrations that do not depend on + // migrate_drupal. + $this->enableModules(['migrate_external_translated_test']); + $migration_plugins = $this->container->get('plugin.manager.migration')->getDefinitions(); + // All the plugins provided by migrate_external_translated_test do depend + // not on migrate_drupal. + $this::assertArrayHasKey('external_translated_test_node', $migration_plugins); + $this::assertArrayHasKey('external_translated_test_node_translation', $migration_plugins); + + // Disable the test module and the list should be empty again. + $this->disableModules(['migrate_external_translated_test']); + $migration_plugins = $this->container->get('plugin.manager.migration')->getDefinitions(); + // All the plugins provided by core depend on migrate_drupal. + $this->assertEmpty($migration_plugins); + // Enable migrate_drupal to test that the plugins can now be discovered. $this->enableModules(['migrate_drupal']); // Set up a migrate database connection so that plugin disocovery works.