public function EntityAccessCheckTest::testAuthenticatedAccessUsingKernel 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::testAuthenticatedAccessUsingKernel()
Tests even listener based access control.
File
- modules/
permissions_by_entity/ tests/ src/ Kernel/ EntityAccessCheckTest.php, line 114
Class
- EntityAccessCheckTest
- Class EntityAccessCheckTest
Namespace
Drupal\Tests\permissions_by_entity\KernelCode
public function testAuthenticatedAccessUsingKernel() {
$dispatcher = $this
->getPopulatedDispatcher();
$this->container
->get('current_user')
->setAccount($this->terms['term_user_a']['user']);
$dispatcher
->dispatch(KernelEvents::REQUEST, $this
->getRequestResponseEvent());
}