You are here

protected function InstallerEmptySettingsTest::prepareEnvironment in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php \Drupal\FunctionalTests\Installer\InstallerEmptySettingsTest::prepareEnvironment()
  2. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php \Drupal\FunctionalTests\Installer\InstallerEmptySettingsTest::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/InstallerEmptySettingsTest.php, line 20

Class

InstallerEmptySettingsTest
Tests the installer with empty settings file.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function prepareEnvironment() {
  parent::prepareEnvironment();

  // Create an empty settings.php file.
  $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory;
  file_put_contents($path . '/settings.php', '');
}