public function RabbitHoleBehaviorInvocationTestBase::testAccessDenied in Rabbit Hole 8
Same name and namespace in other branches
- 2.x tests/src/Functional/RabbitHoleBehaviorInvocationTestBase.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorInvocationTestBase::testAccessDenied()
Test that an entity set to access_denied returns a 403 response.
File
- tests/
src/ Functional/ RabbitHoleBehaviorInvocationTestBase.php, line 76
Class
- RabbitHoleBehaviorInvocationTestBase
- Base class for the rabbit hole behaviors invocation tests.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
public function testAccessDenied() {
$this
->createEntityBundle();
$entity = $this
->createEntity('access_denied');
$this
->drupalGet($entity
->toUrl()
->toString());
$this
->assertSession()
->statusCodeEquals(403);
}