File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/Symfony/Bundle/SecurityBundle/Tests/Functional
app/LogoutWithoutSessionInvalidation Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ public function testSessionLessRememberMeLogout()
35
35
public function testCsrfTokensAreClearedOnLogout ()
36
36
{
37
37
$ client = $ this ->createClient (array ('test_case ' => 'LogoutWithoutSessionInvalidation ' , 'root_config ' => 'config.yml ' ));
38
- $ client ->getContainer ()->get ('security.csrf.token_storage ' )->setToken ('foo ' , 'bar ' );
38
+ $ client ->getContainer ()->get ('test. security.csrf.token_storage ' )->setToken ('foo ' , 'bar ' );
39
39
40
40
$ client ->request ('POST ' , '/login ' , array (
41
41
'_username ' => 'johannes ' ,
42
42
'_password ' => 'test ' ,
43
43
));
44
44
45
- $ this ->assertTrue ($ client ->getContainer ()->get ('security.csrf.token_storage ' )->hasToken ('foo ' ));
46
- $ this ->assertSame ('bar ' , $ client ->getContainer ()->get ('security.csrf.token_storage ' )->getToken ('foo ' ));
45
+ $ this ->assertTrue ($ client ->getContainer ()->get ('test. security.csrf.token_storage ' )->hasToken ('foo ' ));
46
+ $ this ->assertSame ('bar ' , $ client ->getContainer ()->get ('test. security.csrf.token_storage ' )->getToken ('foo ' ));
47
47
48
48
$ client ->request ('GET ' , '/logout ' );
49
49
50
- $ this ->assertFalse ($ client ->getContainer ()->get ('security.csrf.token_storage ' )->hasToken ('foo ' ));
50
+ $ this ->assertFalse ($ client ->getContainer ()->get ('test. security.csrf.token_storage ' )->hasToken ('foo ' ));
51
51
}
52
52
}
Original file line number Diff line number Diff line change 1
1
imports :
2
2
- { resource: ./../config/framework.yml }
3
3
4
+ services :
5
+ test.security.csrf.token_storage :
6
+ alias : security.csrf.token_storage
7
+ public : true
8
+
4
9
security :
5
10
encoders :
6
11
Symfony\Component\Security\Core\User\User : plaintext
You can’t perform that action at this time.
0 commit comments