$this->
assertFalse(static::
getContainer()->
get('security.csrf.token_storage'
)->
hasToken('foo'
));
});
} public function testAccessControlDoesNotApplyOnLogout() { $client =
$this->
createClient(['test_case' => 'Logout', 'root_config' => 'config_access.yml'
]);
$client->
request('POST', '/login',
['_username' => 'johannes', '_password' => 'test'
]);
$client->
request('GET', '/logout'
);
$this->
assertRedirect($client->
getResponse(), '/'
);
} public function testCookieClearingOnLogout() { $client =
$this->
createClient(['test_case' => 'Logout', 'root_config' => 'config_cookie_clearing.yml'
]);
$cookieJar =
$client->
getCookieJar();
$cookieJar->
set(new Cookie('flavor', 'chocolate',
strtotime('+1 day'
), null, 'somedomain'
));
$client->
request('POST', '/login',
['_username' => 'johannes', '_password' => 'test'
]);
$client->
request('GET', '/logout'
);