diff --git a/core/modules/simpletest/src/InstallerTestBase.php b/core/modules/simpletest/src/InstallerTestBase.php index 912b6578c0..73ca636132 100644 --- a/core/modules/simpletest/src/InstallerTestBase.php +++ b/core/modules/simpletest/src/InstallerTestBase.php @@ -240,6 +240,10 @@ protected function refreshVariables() { * etc.). */ protected function continueOnExpectedWarnings($allowed_warnings = []) { + // Don't try to continue if there are errors. + if (strpos($this->getTextContent(), 'Errors found')) { + return; + } $warning_elements = $this->cssSelect('.system-status-report__entry--warning summary'); // Don't allow more warnings than the ones permitted. if (count($allowed_warnings) >= count($warning_elements)) { diff --git a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php b/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php index 799affe37b..a4c8091ecd 100644 --- a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php +++ b/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php @@ -59,7 +59,27 @@ protected function visitInstaller() { file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); parent::visitInstaller(); + } + + /** + * {@inheritdoc} + */ + protected function setUpLanguage() { + // This step is skipped, because the distribution profile uses a fixed + // language. + } + + /** + * {@inheritdoc} + */ + protected function setUpProfile() { + // This step is skipped, because there is a distribution profile. + } + /** + * {@inheritdoc} + */ + protected function setUpSettings() { // The language should have been automatically detected, all following // screens should be translated already. $elements = $this->xpath('//input[@type="submit"]/@value'); @@ -76,22 +96,10 @@ protected function visitInstaller() { $this->assertRaw($this->info['distribution']['install']['theme']); // Verify that the "Choose profile" step does not appear. $this->assertNoText('profile'); - } - /** - * {@inheritdoc} - */ - protected function setUpLanguage() { - // This step is skipped, because the distribution profile uses a fixed - // language. + parent::setUpSettings(); } - /** - * {@inheritdoc} - */ - protected function setUpProfile() { - // This step is skipped, because there is a distribution profile. - } /** * Confirms that the installation succeeded. diff --git a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php b/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php index 09dc18f043..2ab980fead 100644 --- a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php @@ -43,14 +43,6 @@ protected function setUpSettings() { // screen. } - - /** - * {@inheritdoc} - */ - protected function setUpRequirementsProblem() { - // Don't try to click past warnings, because we expect an error. - } - /** * {@inheritdoc} */