public function RabbitHoleBehaviorInvocationTestBase::testDefaultToBundle in Rabbit Hole 8
Same name and namespace in other branches
- 2.x tests/src/Functional/RabbitHoleBehaviorInvocationTestBase.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorInvocationTestBase::testDefaultToBundle()
Test action not set or set to bundle_default will default to bundle action.
File
- tests/
src/ Functional/ RabbitHoleBehaviorInvocationTestBase.php, line 51
Class
- RabbitHoleBehaviorInvocationTestBase
- Base class for the rabbit hole behaviors invocation tests.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
public function testDefaultToBundle() {
$this
->createEntityBundle('access_denied');
$entity = $this
->createEntity();
$this
->drupalGet($entity
->toUrl()
->toString());
$this
->assertSession()
->statusCodeEquals(403);
$entity2 = $this
->createEntity('bundle_default');
$this
->drupalGet($entity2
->toUrl()
->toString());
$this
->assertSession()
->statusCodeEquals(403);
}