public function testSourceProvider() { $this->
enableModules(['migration_provider_test'
]);
$this->
expectException(BadPluginDefinitionException::
class);
$this->
expectExceptionMessage('The no_source_module plugin must define the source_module property.'
);
$this->container->
get('plugin.manager.migration'
)->
getDefinition('migration_provider_no_annotation'
);
} /**
* Tests that modules exist for all source plugins.
*/
public function testProvidersExist() { $this->
enableAllModules();
/** @var \Drupal\migrate\Plugin\MigrateSourcePluginManager $plugin_manager */
$plugin_manager =
$this->container->
get('plugin.manager.migrate.source'
);
foreach ($plugin_manager->
getDefinitions() as $definition) { $id =
$definition['id'
];
$this->
assertArrayHasKey('source_module',
$definition, "No source_module property in '
$id'"
);
} } /**
* Enable all available modules.
*/