diff --git a/core/tests/Drupal/Tests/UnitTestCase.php b/core/tests/Drupal/Tests/UnitTestCase.php
index e869b9f..d3bee7c 100644
--- a/core/tests/Drupal/Tests/UnitTestCase.php
+++ b/core/tests/Drupal/Tests/UnitTestCase.php
@@ -44,12 +44,11 @@ public static function getInfo() {
   /**
    * {@inheritdoc}
    */
-  protected function tearDown() {
-    parent::tearDown();
-    if (\Drupal::getContainer()) {
-      $container = new ContainerBuilder();
-      \Drupal::setContainer($container);
-    }
+  protected function setUp() {
+    parent::setUp();
+    // Ensure that an instantiated container in the global state of \Drupal from
+    // a previous test does not leak into this test.
+    \Drupal::setContainer(NULL);
   }
 
   /**
