diff --git a/src/Browser/KernelBrowser.php b/src/Browser/KernelBrowser.php index 84c91f3..3ad62fe 100644 --- a/src/Browser/KernelBrowser.php +++ b/src/Browser/KernelBrowser.php @@ -57,9 +57,13 @@ final public function withProfiling(): self return $this; } - final public function actingAs(UserInterface $user): self + final public function actingAs(UserInterface $user, ?string $firewall = null): self { - $this->inner()->loginUser($user); + if (null === $firewall) { + $this->inner()->loginUser($user); + } else { + $this->inner()->loginUser($user, $firewall); + } return $this; }