diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 8de7a460c0..1f5ed7745d 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -1004,6 +1004,34 @@ public static function bootEnvironment($app_root = NULL) {
     mb_language('uni');
 
     // Indicate that code is operating in a test child site.
+    static::bootEnvironmentForTestChildSite($app_root);
+
+    // Set the Drupal custom error handler.
+    set_error_handler('_drupal_error_handler');
+    set_exception_handler('_drupal_exception_handler');
+
+    static::$isEnvironmentInitialized = TRUE;
+  }
+
+  /**
+   * Set up the environment for test-within-test cases.
+   *
+   * This method ensures that TestBase and WebTestBase tests are isolated from
+   * themselves.
+   *
+   * This method defines the DRUPAL_TEST_IN_CHILD_SITE constant. This variable
+   * should not be defined anywhere else in code.
+   *
+   * @param string $app_root
+   *   The full path to the application root.
+   *
+   * @deprecated in Drupal 8.6.x for removal before 9.0.0. This method supports
+   *   the Simpletest testing infrastructure, which is being deprecated in
+   *   Drupal 8.
+   *
+   * @todo Cause this method to trigger a deprecation error.
+   */
+  protected static function bootEnvironmentForTestChildSite($app_root) {
     if (!defined('DRUPAL_TEST_IN_CHILD_SITE')) {
       if ($test_prefix = drupal_valid_test_ua()) {
         $test_db = new TestDatabase($test_prefix);
@@ -1032,12 +1060,6 @@ public static function bootEnvironment($app_root = NULL) {
         define('DRUPAL_TEST_IN_CHILD_SITE', FALSE);
       }
     }
-
-    // Set the Drupal custom error handler.
-    set_error_handler('_drupal_error_handler');
-    set_exception_handler('_drupal_exception_handler');
-
-    static::$isEnvironmentInitialized = TRUE;
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
index 660e101f26..cecc718157 100644
--- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -172,6 +172,7 @@ public static function getSkippedDeprecations() {
       'Not setting the strict option of the Choice constraint to true is deprecated since Symfony 3.4 and will throw an exception in 4.0.',
       'Drupal\node\Plugin\Action\DeleteNode is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.',
       'Drupal\comment\Plugin\Action\DeleteComment is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.',
+      'Passing a Session object to the ExpectationException constructor is deprecated as of Mink 1.7. Pass the driver instead.',
     ];
   }
 
