function SessionConfigurationTest::testGeneratedSessionName

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testGeneratedSessionName()
  2. 10 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testGeneratedSessionName()
  3. 9 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testGeneratedSessionName()
  4. 8.9.x core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testGeneratedSessionName()

Tests whether the session.name ini settings is computed correctly.

@legacy-covers ::getOptions

Attributes

#[DataProvider('providerTestGeneratedSessionName')]

File

core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php, line 174

Class

SessionConfigurationTest
Tests Drupal\Core\Session\SessionConfiguration.

Namespace

Drupal\Tests\Core\Session

Code

public function testGeneratedSessionName($uri, $expected_name) : void {
  $config = $this->createSessionConfiguration();
  $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.