function SessionHttpsTest::getGuzzleCookieJar
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getGuzzleCookieJar()
- 8.9.x core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getGuzzleCookieJar()
- 10 core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getGuzzleCookieJar()
Creates a new Guzzle CookieJar with a Xdebug cookie if necessary.
Return value
\GuzzleHttp\Cookie\CookieJar The Guzzle CookieJar.
2 calls to SessionHttpsTest::getGuzzleCookieJar()
- SessionHttpsTest::loginHttp in core/
modules/ system/ tests/ src/ Functional/ Session/ SessionHttpsTest.php - Log in a user via HTTP.
- SessionHttpsTest::loginHttps in core/
modules/ system/ tests/ src/ Functional/ Session/ SessionHttpsTest.php - Log in a user via HTTPS.
File
-
core/
modules/ system/ tests/ src/ Functional/ Session/ SessionHttpsTest.php, line 302
Class
- SessionHttpsTest
- Ensure that when running under HTTPS two session cookies are generated.
Namespace
Drupal\Tests\system\Functional\SessionCode
protected function getGuzzleCookieJar() {
// @todo Add xdebug cookie.
$cookies = $this->extractCookiesFromRequest(\Drupal::request());
foreach ($cookies as $cookie_name => $values) {
$cookies[$cookie_name] = $values[0];
}
return CookieJar::fromArray($cookies, $this->baseUrl);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.