function SessionTestTrait::getSessionName

Same name in other branches
  1. 9 core/tests/Drupal/Tests/SessionTestTrait.php \Drupal\Tests\SessionTestTrait::getSessionName()
  2. 8.9.x core/tests/Drupal/Tests/SessionTestTrait.php \Drupal\Tests\SessionTestTrait::getSessionName()
  3. 10 core/tests/Drupal/Tests/SessionTestTrait.php \Drupal\Tests\SessionTestTrait::getSessionName()

Returns the session name in use on the child site.

Return value

string The name of the session cookie.

6 calls to SessionTestTrait::getSessionName()
BigPipeTest::assertSessionCookieExists in core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
Asserts whether a session cookie exists or not.
BigPipeTest::setCsrfTokenSeedInTestEnvironment in core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
Ensures CSRF tokens can be generated for the current user's session.
BrowserTestBase::getSessionCookies in core/tests/Drupal/Tests/BrowserTestBase.php
Get session cookies from current session.
SessionExistsCacheContextTest::assertSessionCookieOnClient in core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
Asserts whether a session cookie is present on the client or not.
SessionHttpsTest::setUp in core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php

... See full list

File

core/tests/Drupal/Tests/SessionTestTrait.php, line 38

Class

SessionTestTrait
Provides methods to generate and get session name in tests.

Namespace

Drupal\Tests

Code

protected function getSessionName() {
    return $this->sessionName;
}

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