You are here

protected function ValidateMigrationStateTestTrait::enableAllModules in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 3.1.x modules/ubercart/tests/src/Kernel/Traits/ValidateMigrationStateTestTrait.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Traits\ValidateMigrationStateTestTrait::enableAllModules()

Enable all available modules.

1 call to ValidateMigrationStateTestTrait::enableAllModules()
ValidateMigrationStateTestTrait::testMigrationState in modules/ubercart/tests/src/Kernel/Traits/ValidateMigrationStateTestTrait.php
Tests the migration information in .migrate_drupal.yml.

File

modules/ubercart/tests/src/Kernel/Traits/ValidateMigrationStateTestTrait.php, line 155

Class

ValidateMigrationStateTestTrait
Tests the migration state information in module.migrate_drupal.yml.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Traits

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);
  return $modules;
}