protected function SessionHttpsTest::getGuzzleCookieJar in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getGuzzleCookieJar()
- 9 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 300
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);
}