Chris@0: settings['settings']['hash_salt'] = (object) [ Chris@0: 'value' => __CLASS__, Chris@0: 'required' => TRUE, Chris@0: ]; Chris@0: Chris@0: // During interactive install we'll change this to a different profile and Chris@0: // this test will ensure that the new value is written to settings.php. Chris@0: $this->settings['settings']['install_profile'] = (object) [ Chris@0: 'value' => 'minimal', Chris@0: 'required' => TRUE, Chris@0: ]; Chris@0: Chris@0: // Pre-configure database credentials. Chris@0: $connection_info = Database::getConnectionInfo(); Chris@0: unset($connection_info['default']['pdo']); Chris@0: unset($connection_info['default']['init_commands']); Chris@0: Chris@0: $this->settings['databases']['default'] = (object) [ Chris@0: 'value' => $connection_info, Chris@0: 'required' => TRUE, Chris@0: ]; Chris@0: Chris@0: // Use the kernel to find the site path because the site.path service should Chris@0: // not be available at this point in the install process. Chris@0: $site_path = DrupalKernel::findSitePath(Request::createFromGlobals()); Chris@0: // Pre-configure config directories. Chris@0: $this->settings['config_directories'] = [ Chris@0: CONFIG_SYNC_DIRECTORY => (object) [ Chris@0: 'value' => $site_path . '/files/config_sync', Chris@0: 'required' => TRUE, Chris@0: ], Chris@0: ]; Chris@0: mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE); Chris@0: Chris@0: parent::setUp(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: protected function setUpSettings() { Chris@0: // This step should not appear, since settings.php is fully configured Chris@0: // already. Chris@0: } Chris@0: Chris@0: /** Chris@0: * Verifies that installation succeeded. Chris@0: */ Chris@0: public function testInstaller() { Chris@0: $this->assertUrl('user/1'); Chris@0: $this->assertResponse(200); Chris@0: $this->assertEqual('testing', \Drupal::installProfile(), 'Profile was changed from minimal to testing during interactive install.'); Chris@0: $this->assertEqual('testing', Settings::get('install_profile'), 'Profile was correctly changed to testing in Settings.php'); Chris@0: } Chris@0: Chris@0: }