You are here

public function SessionCacheContextTest::setUp in Drupal 8

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()

Overrides UnitTestCase::setUp

File

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

Class

SessionCacheContextTest
@coversDefaultClass \Drupal\Core\Cache\Context\SessionCacheContext @group Cache

Namespace

Drupal\Tests\Core\Cache\Context

Code

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