function SessionConfigurationTest::createSessionConfiguration

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

Constructs a partially mocked SUT.

@returns \Drupal\Core\Session\SessionConfiguration|\PHPUnit\Framework\MockObject\MockObject

7 calls to SessionConfigurationTest::createSessionConfiguration()
SessionConfigurationTest::testConstructorDefaultSettings in core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
Tests constructor's default settings.
SessionConfigurationTest::testCookieSecure in core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
Tests whether the session.cookie_secure ini settings is computed correctly.
SessionConfigurationTest::testCookieSecureNotOverridable in core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
Tests that session.cookie_secure ini settings cannot be overridden.
SessionConfigurationTest::testEnforcedCookieDomain in core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
Tests the constructor injected session.cookie_domain ini setting.
SessionConfigurationTest::testEnforcedSessionNameViaCookieDomain in core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
Tests whether the session.name ini settings is computed correctly.

... See full list

File

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

Class

SessionConfigurationTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Session%21SessionConfiguration.php/class/SessionConfiguration/9" title="Defines the default session configuration generator." class="local">\Drupal\Core\Session\SessionConfiguration</a> @group Session

Namespace

Drupal\Tests\Core\Session

Code

protected function createSessionConfiguration($options = []) {
    return $this->getMockBuilder('Drupal\\Core\\Session\\SessionConfiguration')
        ->onlyMethods([
        'drupalValidTestUa',
    ])
        ->setConstructorArgs([
        $options,
    ])
        ->getMock();
}

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