You are here

public function TestModuleContext::uninstall in Lightning Core 8

Same name and namespace in other branches
  1. 8.5 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::uninstall()
  2. 8.2 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::uninstall()
  3. 8.3 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::uninstall()
  4. 8.4 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::uninstall()

Uninstalls any test modules installed for the scenario.

@AfterScenario

Parameters

AfterScenarioScope $scope: The scenario scope.

File

tests/contexts/TestModuleContext.behat.inc, line 71

Class

TestModuleContext
Allows test modules to be installed during a scenario and uninstalled after.

Namespace

Acquia\LightningExtension\Context

Code

public function uninstall(AfterScenarioScope $scope) {
  $modules = $this
    ->getModules($scope);
  if ($modules) {
    \Drupal::service('module_installer')
      ->uninstall($modules);
  }
}