You are here

protected function M4032404EventSubscriberTest::setUp in 403 to 404 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/EventSubscriber/M4032404EventSubscriberTest.php, line 53

Class

M4032404EventSubscriberTest
Tests for M4032404EventSubscriber.

Namespace

Drupal\Tests\m4032404\Unit\EventSubscriber

Code

protected function setUp() {
  parent::setUp();
  $this->adminContext = $this
    ->getMockBuilder('\\Drupal\\Core\\Routing\\AdminContext')
    ->disableOriginalConstructor()
    ->getMock();
  $this->currentUser = $this
    ->getMockBuilder('\\Drupal\\Core\\Session\\AccountProxy')
    ->disableOriginalConstructor()
    ->getMock();
  $kernel = $this
    ->createMock('\\Symfony\\Component\\HttpKernel\\HttpKernelInterface');
  $request = new Request();
  $this->event = new GetResponseForExceptionEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, new AccessDeniedHttpException());
}