You are here

protected function MigrationProvidersExistTest::enableAllModules 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::enableAllModules()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationProvidersExistTest::enableAllModules()

Enable all available modules.

2 calls to MigrationProvidersExistTest::enableAllModules()
MigrationProvidersExistTest::testFieldProvidersExist in core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
Tests that modules exist for all field plugins.
MigrationProvidersExistTest::testProvidersExist in core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
Tests that modules exist for all source plugins.

File

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

Class

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

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

protected function enableAllModules() {

  // Install all available modules.
  $module_handler = $this->container
    ->get('module_handler');
  $modules = $this
    ->coreModuleListDataProvider();
  $modules_enabled = $module_handler
    ->getModuleList();
  $modules_to_enable = array_keys(array_diff_key($modules, $modules_enabled));
  $this
    ->enableModules($modules_to_enable);
}