You are here

public function RabbitHoleBehaviorInvocationTestBase::testDisplayPage in Rabbit Hole 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/RabbitHoleBehaviorInvocationTestBase.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorInvocationTestBase::testDisplayPage()

Test that an entity set to display_page returns a 200 response.

File

tests/src/Functional/RabbitHoleBehaviorInvocationTestBase.php, line 86

Class

RabbitHoleBehaviorInvocationTestBase
Base class for the rabbit hole behaviors invocation tests.

Namespace

Drupal\Tests\rabbit_hole\Functional

Code

public function testDisplayPage() {
  $this
    ->createEntityBundle('access_denied');
  $entity = $this
    ->createEntity('display_page');
  $this
    ->drupalGet($entity
    ->toUrl()
    ->toString());
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}