function SessionCacheContextTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php \Drupal\Tests\Core\Cache\Context\SessionCacheContextTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php \Drupal\Tests\Core\Cache\Context\SessionCacheContextTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php \Drupal\Tests\Core\Cache\Context\SessionCacheContextTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php, line 42

Class

SessionCacheContextTest
@coversDefaultClass \Drupal\Core\Cache\Context\SessionCacheContext[[api-linebreak]] @group Cache

Namespace

Drupal\Tests\Core\Cache\Context

Code

protected function setUp() : void {
  parent::setUp();
  $this->request = new Request();
  $this->requestStack = new RequestStack();
  $this->requestStack
    ->push($this->request);
  $this->session = $this->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\SessionInterface')
    ->getMock();
}

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