You are here

public function ConfigInstallWebTest::testConfigModuleRequirements in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config/tests/src/Functional/ConfigInstallWebTest.php \Drupal\Tests\config\Functional\ConfigInstallWebTest::testConfigModuleRequirements()
  2. 9 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 224

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
    ->drupalGet('admin/modules');
  $this
    ->submitForm([
    'modules[config][enable]' => TRUE,
  ], '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
    ->assertSession()
    ->pageTextContains("The directory {$directory} does not exist.");
}