You are here

public function SessionConfigurationTest::testConstructorDefaultSettings in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::testConstructorDefaultSettings()

Tests constructor's default settings.

@covers ::__construct

@dataProvider providerTestConstructorDefaultSettings

File

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

Class

SessionConfigurationTest
@coversDefaultClass \Drupal\Core\Session\SessionConfiguration @group Session

Namespace

Drupal\Tests\Core\Session

Code

public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character) {
  $config = $this
    ->createSessionConfiguration($options);
  $options = $config
    ->getOptions(Request::createFromGlobals());
  $this
    ->assertSame($expected_sid_length, $options['sid_length']);
  $this
    ->assertSame($expected_sid_bits_per_character, $options['sid_bits_per_character']);
}