function InstallerExistingConfigExistingSettingsTest::prepareEnvironment
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigExistingSettingsTest::prepareEnvironment()
- 10 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigExistingSettingsTest::prepareEnvironment()
Partially configures a preexisting settings.php file before invoking the interactive installer.
Overrides InstallerConfigDirectoryTestBase::prepareEnvironment
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerExistingConfigExistingSettingsTest.php, line 22
Class
- InstallerExistingConfigExistingSettingsTest
- Verifies that installing from existing configuration works.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function prepareEnvironment() : void {
parent::prepareEnvironment();
// Pre-configure hash salt.
// Any string is valid, so simply use the class name of this test.
$this->settings['settings']['hash_salt'] = (object) [
'value' => __CLASS__,
'required' => TRUE,
];
// Pre-configure database credentials.
$connection_info = Database::getConnectionInfo();
unset($connection_info['default']['pdo']);
unset($connection_info['default']['init_commands']);
$this->settings['databases']['default'] = (object) [
'value' => $connection_info,
'required' => TRUE,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.