Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxetom committed Feb 1, 2025
1 parent 826f053 commit 1e8f3b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/EventListener/LoginListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,18 @@ public function __toString(): string
}
}

public function testHandleKernelRequestEventDoesNothingIfRequestIsForStatelessRoute(): void
{
$this->tokenStorage->expects($this->never())
->method('getToken');

$this->listener->handleKernelRequestEvent(new RequestEvent(
$this->createMock(HttpKernelInterface::class),
new Request(attributes: ['_stateless' => true]),
HttpKernelInterface::SUB_REQUEST
));
}

public function testHandleKernelRequestEventDoesNothingIfRequestIsNotMain(): void
{
$this->tokenStorage->expects($this->never())
Expand Down

0 comments on commit 1e8f3b4

Please sign in to comment.