Skip to content

Commit 1e8f3b4

Browse files
committed
added test
1 parent 826f053 commit 1e8f3b4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/EventListener/LoginListenerTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,18 @@ public function __toString(): string
298298
}
299299
}
300300

301+
public function testHandleKernelRequestEventDoesNothingIfRequestIsForStatelessRoute(): void
302+
{
303+
$this->tokenStorage->expects($this->never())
304+
->method('getToken');
305+
306+
$this->listener->handleKernelRequestEvent(new RequestEvent(
307+
$this->createMock(HttpKernelInterface::class),
308+
new Request(attributes: ['_stateless' => true]),
309+
HttpKernelInterface::SUB_REQUEST
310+
));
311+
}
312+
301313
public function testHandleKernelRequestEventDoesNothingIfRequestIsNotMain(): void
302314
{
303315
$this->tokenStorage->expects($this->never())

0 commit comments

Comments
 (0)