You are here

protected function ModuleInstallUninstallWebTest::testInstallationAndUninstallation in Flysystem 8

Same name and namespace in other branches
  1. 7 src/Tests/ModuleInstallUninstallWebTest.php \Drupal\flysystem\Tests\ModuleInstallUninstallWebTest::testInstallationAndUninstallation()

Tests installation and uninstallation.

File

src/Tests/ModuleInstallUninstallWebTest.php, line 22

Class

ModuleInstallUninstallWebTest
Tests module installation and uninstallation.

Namespace

Drupal\flysystem\Tests

Code

protected function testInstallationAndUninstallation() {
  $module_handler = \Drupal::moduleHandler();
  $this
    ->assertTrue($module_handler
    ->moduleExists(reset(static::$modules)));

  /** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
  $module_installer = \Drupal::service('module_installer');
  $module_installer
    ->uninstall(static::$modules);
  $this
    ->assertFalse($module_handler
    ->moduleExists(reset(static::$modules)));
}