public function EntityAccessCheckTest::testAnonymousAccessDeniedUsingKernel in Permissions by Term 8.2
Same name and namespace in other branches
- 8 modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php \Drupal\Tests\permissions_by_entity\Kernel\EntityAccessCheckTest::testAnonymousAccessDeniedUsingKernel()
Tests even listener based access control.
File
- modules/
permissions_by_entity/ tests/ src/ Kernel/ EntityAccessCheckTest.php, line 104
Class
- EntityAccessCheckTest
- Class EntityAccessCheckTest
Namespace
Drupal\Tests\permissions_by_entity\KernelCode
public function testAnonymousAccessDeniedUsingKernel() {
$dispatcher = $this
->getPopulatedDispatcher();
$this
->setExpectedException(AccessDeniedHttpException::class);
$dispatcher
->dispatch(KernelEvents::REQUEST, $this
->getRequestResponseEvent());
}