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