You are here

public function MigrationProvidersExistTest::testProvidersExist in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationProvidersExistTest::testProvidersExist()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationProvidersExistTest::testProvidersExist()

Tests that modules exist for all source plugins.

File

core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php, line 34

Class

MigrationProvidersExistTest
Tests that modules exist for all source and destination plugins.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

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}'");
  }
}