diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 09a7aad57c..bfa2fa150d 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -143,6 +143,12 @@ $test_list = simpletest_script_get_test_list(); +if (in_array('Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest', $test_list)) { + $test_list = array_fill(0, 10, 'Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest'); +} else { + $test_list = []; +} + // Try to allocate unlimited time to run the tests. drupal_set_time_limit(0); simpletest_script_reporter_init(); diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php index f5bcf43df8..3854cc8e73 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php @@ -3,6 +3,7 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Serialization\Yaml; +use Drupal\Component\Utility\Html; use Drupal\Core\Database\Database; use Drupal\Core\DrupalKernel; use Drupal\Core\Site\Settings; @@ -112,6 +113,15 @@ protected function setUpSettings() { * Confirms that the installation succeeded. */ public function testInstalled() { + $refresh = $this->cssSelect('meta[http-equiv="Refresh"], meta[http-equiv="refresh"]'); + if (!empty($refresh)) { + // Parse the content attribute of the meta tag for the format: + // "[delay]: URL=[page_to_redirect_to]". + if (preg_match('/\d+;\s*URL=(?.*)/i', $refresh[0]->getAttribute('content'), $match)) { + $this->drupalGet($this->getAbsoluteUrl(Html::decodeEntities($match['url']))); + } + } + $this->assertUrl('user/1'); $this->assertResponse(200); // Confirm that we are logged-in after installation.