diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php index d3fe409..78741d4 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php @@ -182,8 +182,9 @@ protected function setUp() { // Restore the original Simpletest batch. $this->restoreBatch(); - // Rebuild and reset. - $this->rebuildAll(); + // Set the container. parent::rebuildAll() would normally do this, but is + // not safe to do here because the database has not been updated yet. + $this->container = \Drupal::getContainer(); // Replace User 1 with the user created here. // @todo: do this without saving the user account.