You are here

public function EntityViewControllerTest::testEntityViewControllerViewBuilder in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Entity/EntityViewControllerTest.php \Drupal\system\Tests\Entity\EntityViewControllerTest::testEntityViewControllerViewBuilder()

Tests that a view builder can successfully override the view builder.

File

core/modules/system/src/Tests/Entity/EntityViewControllerTest.php, line 118
Contains \Drupal\system\Tests\Entity\EntityViewControllerTest.

Class

EntityViewControllerTest
Tests EntityViewController functionality.

Namespace

Drupal\system\Tests\Entity

Code

public function testEntityViewControllerViewBuilder() {
  $entity_test = $this
    ->createTestEntity('entity_test_view_builder');
  $entity_test
    ->save();
  $this
    ->drupalGet('entity_test_view_builder/' . $entity_test
    ->id());
  $this
    ->assertText($entity_test
    ->label());
}