function SessionCacheContextTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ SessionCacheContextTest.php, line 40  
Class
- SessionCacheContextTest
 - @coversDefaultClass \Drupal\Core\Cache\Context\SessionCacheContext[[api-linebreak]] @group Cache
 
Namespace
Drupal\Tests\Core\Cache\ContextCode
public function setUp() : void {
  $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.