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