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, ]; // Use the kernel to find the site path because the site.path service should // not be available at this point in the install process. $site_path = DrupalKernel::findSitePath(Request::createFromGlobals()); // Pre-configure config directories. $this->settings['config_directories'] = [ CONFIG_SYNC_DIRECTORY => (object) [ 'value' => $site_path . '/files/config_sync', 'required' => TRUE, ], ]; mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE); } /** * {@inheritdoc} */ protected function setUpSettings() { // This step should not appear, since settings.php is fully configured // already. } /** * Verifies that installation succeeded. */ public function testInstaller() { $this->assertUrl('user/1'); $this->assertResponse(200); $this->assertEqual('testing', \Drupal::installProfile()); } }