protected function InstallerExistingConfigDirectoryTest::prepareEnvironment in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigDirectoryTest::prepareEnvironment()
- 9 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigDirectoryTest::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/ InstallerExistingConfigDirectoryTest.php, line 27
Class
- InstallerExistingConfigDirectoryTest
- Tests installation when a config_sync_directory exists and is set up.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function prepareEnvironment() {
parent::prepareEnvironment();
mkdir($this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/config_read_only', 0444);
$this->expectedFilePerms = fileperms($this->siteDirectory . '/config_read_only');
$this->settings['settings']['config_sync_directory'] = (object) [
'value' => $this->siteDirectory . '/config_read_only',
'required' => TRUE,
];
}