protected function CsrfAccessCheckTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php \Drupal\Tests\Core\Access\CsrfAccessCheckTest::setUp()
- 10 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 38
Class
- CsrfAccessCheckTest
- @coversDefaultClass \Drupal\Core\Access\CsrfAccessCheck @group Access
Namespace
Drupal\Tests\Core\AccessCode
protected function setUp() : void {
$this->csrfToken = $this
->getMockBuilder('Drupal\\Core\\Access\\CsrfTokenGenerator')
->disableOriginalConstructor()
->getMock();
$this->routeMatch = $this
->createMock('Drupal\\Core\\Routing\\RouteMatchInterface');
$this->accessCheck = new CsrfAccessCheck($this->csrfToken);
}