static::
assertNotNull($sessionCookie);
$browser->
request('GET', '/account/logout',
[]);
$response =
$browser->
getResponse();
static::
assertSame(302,
$response->
getStatusCode(),
(string) $response->
getContent());
$browser->
request('GET', '/',
[]);
$response =
$browser->
getResponse();
static::
assertSame(200,
$response->
getStatusCode(),
(string) $response->
getContent());
$session =
$browser->
getRequest()->
getSession();
if ($session->
isStarted()) { // Close the old session
$session->
save();
} // Set previous session id
$session->
setId($sessionCookie->
getValue());
// Set previous session cookie
$browser->
getCookieJar()->
set($sessionCookie);
// Try opening account page
$browser->
request('GET', EnvironmentHelper::
getVariable('APP_URL'
) . '/account',
[]);