You are here

protected function CsrfAccessCheckTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php \Drupal\Tests\Core\Access\CsrfAccessCheckTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php, line 43
Contains \Drupal\Tests\Core\Access\CsrfAccessCheckTest.

Class

CsrfAccessCheckTest
@coversDefaultClass \Drupal\Core\Access\CsrfAccessCheck @group Access

Namespace

Drupal\Tests\Core\Access

Code

protected function setUp() {
  $this->csrfToken = $this
    ->getMockBuilder('Drupal\\Core\\Access\\CsrfTokenGenerator')
    ->disableOriginalConstructor()
    ->getMock();
  $this->routeMatch = $this
    ->getMock('Drupal\\Core\\Routing\\RouteMatchInterface');
  $this->accessCheck = new CsrfAccessCheck($this->csrfToken);
}