function InstallerEmptySettingsTest::prepareEnvironment

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php \Drupal\FunctionalTests\Installer\InstallerEmptySettingsTest::prepareEnvironment()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php \Drupal\FunctionalTests\Installer\InstallerEmptySettingsTest::prepareEnvironment()
  3. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php \Drupal\FunctionalTests\Installer\InstallerEmptySettingsTest::prepareEnvironment()

Overrides FunctionalTestSetupTrait::prepareEnvironment

File

core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php, line 22

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', '');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.