From d003c7276ae7daf7bcb21977ce3c54ab8e28502f Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Wed, 16 Dec 2015 11:25:51 +0000 Subject: [PATCH] Issue #2635324 by dawehner: kernel tests are unrunnabble because markTestSkipped message is not displayed --- core/modules/simpletest/src/BrowserTestBase.php | 2 +- core/tests/Drupal/KernelTests/KernelTestBase.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php index ed64f0833d06..a2bf771e0ae7 100644 --- a/core/modules/simpletest/src/BrowserTestBase.php +++ b/core/modules/simpletest/src/BrowserTestBase.php @@ -291,7 +291,7 @@ protected function setUp() { // coverage against. $base_url = getenv('SIMPLETEST_BASE_URL'); if (!$base_url) { - $this->markTestSkipped( + throw new \Exception( 'You must provide a SIMPLETEST_BASE_URL environment variable to run some PHPUnit based functional tests.' ); } diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index a0ed6a67d2ed..8d629ba079a4 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -406,7 +406,7 @@ protected function getDatabaseConnectionInfo() { // If the test is run with argument dburl then use it. $db_url = getenv('SIMPLETEST_DB'); if (empty($db_url)) { - $this->markTestSkipped('There is no database connection so no tests can be run. You must provide a SIMPLETEST_DB environment variable to run PHPUnit based functional tests outside of run-tests.sh. See https://www.drupal.org/node/2116263#skipped-tests for more information.'); + throw new \Exception('There is no database connection so no tests can be run. You must provide a SIMPLETEST_DB environment variable to run PHPUnit based functional tests outside of run-tests.sh. See https://www.drupal.org/node/2116263#skipped-tests for more information.'); } else { $database = Database::convertDbUrlToConnectionInfo($db_url, $this->root); -- GitLab