function SessionConfigurationTest::testConstructorDefaultSettings

Tests constructor's default settings.

@legacy-covers ::__construct

File

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

Class

SessionConfigurationTest
Tests Drupal\Core\Session\SessionConfiguration.

Namespace

Drupal\Tests\Core\Session

Code

public function testConstructorDefaultSettings() : void {
  $config = $this->createSessionConfiguration([]);
  $options = $config->getOptions(Request::createFromGlobals());
  $this->assertSame('', $options['name_suffix']);
  $config = $this->createSessionConfiguration([
    'name_suffix' => 'some-suffix',
  ]);
  $options = $config->getOptions(Request::createFromGlobals());
  $this->assertSame('some-suffix', $options['name_suffix']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.