diff --cc core/modules/simpletest/src/WebTestBase.php index 4072158,e75411d..0000000 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@@ -845,26 -847,6 +848,29 @@@ abstract class WebTestBase extends Test ); $this->writeSettings($settings); ++<<<<<<< HEAD + // Allow for test-specific overrides. + $settings_testing_file = DRUPAL_ROOT . '/' . $this->originalSite . '/settings.testing.php'; + if (file_exists($settings_testing_file)) { + // Copy the testing-specific settings.php overrides in place. + copy($settings_testing_file, $directory . '/settings.testing.php'); + // Add the name of the testing class to settings.php and include the + // testing specific overrides + file_put_contents($directory . '/settings.php', "\n\$test_class = '" . get_class($this) ."';\n" . 'include DRUPAL_ROOT . \'/\' . $conf_path . \'/settings.testing.php\';' ."\n", FILE_APPEND); + } + $settings_services_file = DRUPAL_ROOT . '/' . $this->originalSite . '/testing.services.yml'; + if (file_exists($settings_services_file)) { + // Copy the testing-specific service overrides in place. + copy($settings_services_file, $directory . '/services.yml'); + } + + // Since Drupal is bootstrapped already, install_begin_request() will not + // bootstrap into DRUPAL_BOOTSTRAP_CONFIGURATION (again). Hence, we have to + // reload the newly written custom settings.php manually. + drupal_settings_initialize(); + ++======= ++>>>>>>> 8.x // Execute the non-interactive installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; install_drupal($parameters); @@@ -881,9 -862,13 +886,13 @@@ // directory has to be writable. // TestBase::restoreEnvironment() will delete the entire site directory. // Not using File API; a potential error must trigger a PHP warning. - chmod(DRUPAL_ROOT . '/' . $this->siteDirectory, 0777); + chmod($directory, 0777); - $this->rebuildContainer(); + $request = \Drupal::request(); + $this->kernel = DrupalKernel::createFromRequest($request, drupal_classloader(), 'prod', TRUE); + $this->kernel->prepareLegacyRequest($request); + $container = $this->kernel->getContainer(); + $config = $container->get('config.factory'); // Manually create and configure private and temporary files directories. // While these could be preset/enforced in settings.php like the public