@@ -54,6 +54,7 @@ public function testGetListenersWithInvalidParameter()
54
54
$ this ->assertEquals ([[], null , null ], $ firewallMap ->getListeners ($ request ));
55
55
$ this ->assertNull ($ firewallMap ->getFirewallConfig ($ request ));
56
56
$ this ->assertFalse ($ request ->attributes ->has (self ::ATTRIBUTE_FIREWALL_CONTEXT ));
57
+ $ this ->assertFalse ($ request ->attributes ->has ('_stateless ' ));
57
58
}
58
59
59
60
public function testGetListeners ()
@@ -62,8 +63,8 @@ public function testGetListeners()
62
63
63
64
$ firewallContext = $ this ->createMock (FirewallContext::class);
64
65
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 );
67
68
68
69
$ listener = function () {};
69
70
$ firewallContext ->expects ($ this ->once ())->method ('getListeners ' )->willReturn ([$ listener ]);
@@ -88,5 +89,6 @@ public function testGetListeners()
88
89
$ this ->assertEquals ([[$ listener ], $ exceptionListener , $ logoutListener ], $ firewallMap ->getListeners ($ request ));
89
90
$ this ->assertEquals ($ firewallConfig , $ firewallMap ->getFirewallConfig ($ request ));
90
91
$ this ->assertEquals ('security.firewall.map.context.foo ' , $ request ->attributes ->get (self ::ATTRIBUTE_FIREWALL_CONTEXT ));
92
+ $ this ->assertTrue ($ request ->attributes ->get ('_stateless ' ));
91
93
}
92
94
}
0 commit comments