diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
index 879ca80..fc4d031 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
@@ -87,7 +87,10 @@ protected function setUp() {
 
     $this->keyValueFactory = new KeyValueMemoryFactory();
 
-    parent::setUp();
+    if (!parent::setUp()) {
+      return FALSE;
+    }
+
     // Build a minimal, partially mocked environment for unit tests.
     $this->containerBuild(\Drupal::getContainer());
     // Make sure it survives kernel rebuilds.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 9e7b6b2..ce78730 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -157,6 +157,15 @@
   protected $public_files_directory;
 
   /**
+   * The configuration directories for the test environment.
+   *
+   * This is set in TestBase::prepareConfigDirectories().
+   *
+   * @var array
+   */
+  protected $configDirectories;
+
+  /**
    * Whether to die in case any test assertion fails.
    *
    * @var boolean
@@ -959,7 +968,9 @@ protected function prepareEnvironment() {
     $this->generatedTestFiles = FALSE;
 
     // Create and set new configuration directories.
-    $this->prepareConfigDirectories();
+    if (!$this->prepareConfigDirectories()) {
+      return FALSE;
+    }
 
     // Reset statics before the old container is replaced so that objects with a
     // __destruct() method still have access to it.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
index 5510aa4..5dcfff9 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -20,11 +20,6 @@
 abstract class UnitTestBase extends TestBase {
 
   /**
-   * @var array
-   */
- protected $configDirectories;
-
-  /**
    * Constructor for UnitTestBase.
    */
   function __construct($test_id = NULL) {
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php
index e5ec825..9ca1c64 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewUnitTestBase.php
@@ -33,7 +33,9 @@
   public static $modules = array('system', 'views', 'views_test_config', 'views_test_data');
 
   protected function setUp() {
-    parent::setUp();
+    if (!parent::setUp()) {
+      return FALSE;
+    }
 
     $this->setUpFixtures();
   }
