diff --git a/src/Symfony/Bundle/Test/Client.php b/src/Symfony/Bundle/Test/Client.php index b6192abd70..1936314ab5 100644 --- a/src/Symfony/Bundle/Test/Client.php +++ b/src/Symfony/Bundle/Test/Client.php @@ -236,6 +236,8 @@ private static function extractHeaders(array $options): array public function loginUser(UserInterface $user, string $firewallContext = 'main'): self { + $this->kernelBrowser->getKernel()->boot(); + $this->kernelBrowser->loginUser($user, $firewallContext); return $this;