function SessionConfigurationTest::testEnforcedSessionNameViaCookieDomain
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testEnforcedSessionNameViaCookieDomain()
- 8.9.x core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testEnforcedSessionNameViaCookieDomain()
- 10 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testEnforcedSessionNameViaCookieDomain()
Tests whether the session.name ini settings is computed correctly.
@covers ::getOptions
@dataProvider providerTestEnforcedSessionName
File
-
core/
tests/ Drupal/ Tests/ Core/ Session/ SessionConfigurationTest.php, line 221
Class
- SessionConfigurationTest
- @coversDefaultClass \Drupal\Core\Session\SessionConfiguration @group Session
Namespace
Drupal\Tests\Core\SessionCode
public function testEnforcedSessionNameViaCookieDomain($uri, $expected_name) : void {
$config = $this->createSessionConfiguration([
'cookie_domain' => '.example.com',
]);
$request = Request::create($uri);
$options = $config->getOptions($request);
$this->assertEquals($expected_name, $options['name']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.