InstallerExistingConfigExistingSettingsTest.php
Same filename in other branches
Namespace
Drupal\FunctionalTests\InstallerFile
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerExistingConfigExistingSettingsTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\FunctionalTests\Installer;
use Drupal\Core\Database\Database;
/**
* Verifies that installing from existing configuration works.
*
* @group Installer
*/
class InstallerExistingConfigExistingSettingsTest extends InstallerExistingConfigTest {
/**
* {@inheritdoc}
*
* Partially configures a preexisting settings.php file before invoking the
* interactive installer.
*/
protected function prepareEnvironment() {
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,
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
InstallerExistingConfigExistingSettingsTest | Verifies that installing from existing configuration works. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.