$this->insecureSessionName =
$this->
getSessionName();
} } /**
* Tests HTTPS sessions.
*/
public function testHttpsSession() { $user =
$this->
drupalCreateUser(['access administration pages'
]);
/** @var \Symfony\Component\BrowserKit\CookieJar $browser_kit_cookie_jar */
$browser_kit_cookie_jar =
$this->
getSession()->
getDriver()->
getClient()->
getCookieJar();
// Test HTTPS session handling by submitting the login form through
// https.php, which creates a mock HTTPS request.
$this->
loginHttps($user);
$first_secure_session =
$this->
getSession()->
getCookie($this->secureSessionName
);
// Test a second concurrent session.
$this->
loginHttps($user);
$this->
assertNotSame($first_secure_session,
$this->
getSession()->
getCookie($this->secureSessionName
));
// Check secure cookie is set.