// 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 not
// depend 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'
]);
// Make sure retrieving these migration plugins in the absence of a database
// connection does not throw any errors.
$migration_plugins =
$this->container->
get('plugin.manager.migration'
)->
createInstances([]);
// Any database-based source plugins should fail a requirements test in the