protected function SessionHttpsTest::setUp 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::setUp()
- 9 core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Functional/ Session/ SessionHttpsTest.php, line 49
Class
- SessionHttpsTest
- Ensure that when running under HTTPS two session cookies are generated.
Namespace
Drupal\Tests\system\Functional\SessionCode
protected function setUp() : void {
parent::setUp();
$request = Request::createFromGlobals();
if ($request
->isSecure()) {
$this->secureSessionName = $this
->getSessionName();
$this->insecureSessionName = substr($this
->getSessionName(), 1);
}
else {
$this->secureSessionName = 'S' . $this
->getSessionName();
$this->insecureSessionName = $this
->getSessionName();
}
}