diff --git a/core/tests/Drupal/Tests/UnitTestCase.php b/core/tests/Drupal/Tests/UnitTestCase.php index 4561d82..e869b9f 100644 --- a/core/tests/Drupal/Tests/UnitTestCase.php +++ b/core/tests/Drupal/Tests/UnitTestCase.php @@ -46,8 +46,10 @@ public static function getInfo() { */ protected function tearDown() { parent::tearDown(); - $container = new ContainerBuilder(); - \Drupal::setContainer($container); + if (\Drupal::getContainer()) { + $container = new ContainerBuilder(); + \Drupal::setContainer($container); + } } /**