You are here

public function ModuleUninstallTest::testModules in Thunder 6.1.x

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()
  2. 8.2 tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()
  3. 8.3 tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()
  4. 8.4 tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()
  5. 6.2.x tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()
  6. 6.0.x tests/src/Functional/ModuleUninstallTest.php \Drupal\Tests\thunder\Functional\ModuleUninstallTest::testModules()

Compare active configuration with configuration Yaml files.

File

tests/src/Functional/ModuleUninstallTest.php, line 86

Class

ModuleUninstallTest
Test for checking of module uninstall functionality.

Namespace

Drupal\Tests\thunder\Functional

Code

public function testModules() {
  $uninstallFailures = [];
  foreach (static::$moduleLists as $modules) {
    try {
      $this
        ->installModules($modules);
      $this
        ->uninstallModules($modules);
      $this
        ->installModules($modules);
    } catch (\Exception $e) {

      // Store errors, so that all modules can be tested.
      $uninstallFailures[] = [
        'modules' => $modules,
        'error' => $e
          ->getMessage(),
      ];
    }
  }
  if ($uninstallFailures) {

    // Output all errors for modules tested.
    throw new \Exception(print_r($uninstallFailures, TRUE));
  }
}