@@ -54,6 +54,7 @@ public function testGetListenersWithInvalidParameter()
5454 $ this ->assertEquals ([[], null , null ], $ firewallMap ->getListeners ($ request ));
5555 $ this ->assertNull ($ firewallMap ->getFirewallConfig ($ request ));
5656 $ this ->assertFalse ($ request ->attributes ->has (self ::ATTRIBUTE_FIREWALL_CONTEXT ));
57+ $ this ->assertFalse ($ request ->attributes ->has ('_stateless ' ));
5758 }
5859
5960 public function testGetListeners ()
@@ -62,8 +63,8 @@ public function testGetListeners()
6263
6364 $ firewallContext = $ this ->createMock (FirewallContext::class);
6465
65- $ firewallConfig = new FirewallConfig ('main ' , 'user_checker ' );
66- $ firewallContext ->expects ($ this ->once ( ))->method ('getConfig ' )->willReturn ($ firewallConfig );
66+ $ firewallConfig = new FirewallConfig ('main ' , 'user_checker ' , null , true , true );
67+ $ firewallContext ->expects ($ this ->exactly ( 2 ))->method ('getConfig ' )->willReturn ($ firewallConfig );
6768
6869 $ listener = function () {};
6970 $ firewallContext ->expects ($ this ->once ())->method ('getListeners ' )->willReturn ([$ listener ]);
@@ -88,5 +89,6 @@ public function testGetListeners()
8889 $ this ->assertEquals ([[$ listener ], $ exceptionListener , $ logoutListener ], $ firewallMap ->getListeners ($ request ));
8990 $ this ->assertEquals ($ firewallConfig , $ firewallMap ->getFirewallConfig ($ request ));
9091 $ this ->assertEquals ('security.firewall.map.context.foo ' , $ request ->attributes ->get (self ::ATTRIBUTE_FIREWALL_CONTEXT ));
92+ $ this ->assertTrue ($ request ->attributes ->get ('_stateless ' ));
9193 }
9294}
0 commit comments