You are here

public function ConfigInstallWebTest::testConfigModuleRequirements in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/config/tests/src/Functional/ConfigInstallWebTest.php \Drupal\Tests\config\Functional\ConfigInstallWebTest::testConfigModuleRequirements()
  2. 10 core/modules/config/tests/src/Functional/ConfigInstallWebTest.php \Drupal\Tests\config\Functional\ConfigInstallWebTest::testConfigModuleRequirements()

Tests config_requirements().

File

core/modules/config/tests/src/Functional/ConfigInstallWebTest.php, line 211

Class

ConfigInstallWebTest
Tests installation and removal of configuration objects in install, disable and uninstall functionality.

Namespace

Drupal\Tests\config\Functional

Code

public function testConfigModuleRequirements() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalPostForm('admin/modules', [
    'modules[config][enable]' => TRUE,
  ], t('Install'));
  $directory = Settings::get('config_sync_directory');
  try {
    \Drupal::service('file_system')
      ->deleteRecursive($directory);
  } catch (FileException $e) {

    // Ignore failed deletes.
  }
  $this
    ->drupalGet('/admin/reports/status');
  $this
    ->assertRaw(t('The directory %directory does not exist.', [
    '%directory' => $directory,
  ]));
}