use Symfony\Component\BrowserKit\Cookie;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
class LogoutTest extends AbstractWebTestCase
{ public function testCsrfTokensAreClearedOnLogout() { $client =
$this->
createClient(['test_case' => 'LogoutWithoutSessionInvalidation', 'root_config' => 'config.yml'
]);
$client->
disableReboot();
$client->
request('POST', '/login',
[ '_username' => 'johannes',
'_password' => 'test',
]);
$this->
callInRequestContext($client,
function D
) { static::
getContainer()->
get('security.csrf.token_storage'
)->
setToken('foo', 'bar'
);
});
$client->
request('GET', '/logout'
);