You are here

protected function InstallerConfigDirectorySetNoDirectoryTest::prepareEnvironment in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php \Drupal\FunctionalTests\Installer\InstallerConfigDirectorySetNoDirectoryTest::prepareEnvironment()
  2. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php \Drupal\FunctionalTests\Installer\InstallerConfigDirectorySetNoDirectoryTest::prepareEnvironment()

Prepares the current environment for running the test.

Also sets up new resources for the testing environment, such as the public filesystem and configuration directories.

Overrides FunctionalTestSetupTrait::prepareEnvironment

File

core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php, line 29

Class

InstallerConfigDirectorySetNoDirectoryTest
Tests the installer when a custom config directory set up but does not exist.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function prepareEnvironment() {
  parent::prepareEnvironment();
  $this->syncDirectory = $this->publicFilesDirectory . '/config_' . Crypt::randomBytesBase64() . '/sync';
  $this->settings['settings']['config_sync_directory'] = (object) [
    'value' => $this->syncDirectory,
    'required' => TRUE,
  ];
}