You are here

private function EntityAccessCheckTest::getRequestResponseEvent in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php \Drupal\Tests\permissions_by_entity\Kernel\EntityAccessCheckTest::getRequestResponseEvent()

Gets a request response event for term A.

Return value

\Symfony\Component\HttpKernel\Event\GetResponseEvent

3 calls to EntityAccessCheckTest::getRequestResponseEvent()
EntityAccessCheckTest::testAnonymousAccessDeniedUsingKernel in modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php
Tests even listener based access control.
EntityAccessCheckTest::testAuthenticatedAccessUsingKernel in modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php
Tests even listener based access control.
EntityAccessCheckTest::testAuthenticatedDeniedOnCachedAccessUsingKernel in modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php
Tests even listener based access control.

File

modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php, line 224

Class

EntityAccessCheckTest
Class EntityAccessCheckTest

Namespace

Drupal\Tests\permissions_by_entity\Kernel

Code

private function getRequestResponseEvent() {
  $request = new Request();
  $request->attributes
    ->set('_entity', $this->nodes['test_entity_term_a']);
  $kernel = $this
    ->getMock(HttpKernelInterface::class);
  return new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
}