You are here

protected function LayoutSectionClassesTest::renderEntity in Layout Section Classes 8

Render the test entity.

Return value

string The test entity.

1 call to LayoutSectionClassesTest::renderEntity()
LayoutSectionClassesTest::testLayoutSectionClasses in tests/src/Functional/LayoutSectionClassesTest.php
Test the layout section classes.

File

tests/src/Functional/LayoutSectionClassesTest.php, line 57

Class

LayoutSectionClassesTest
Test layout section classes.

Namespace

Drupal\Tests\layout_section_classes\Functional

Code

protected function renderEntity() {
  $view_builder = $this->container
    ->get('entity_type.manager')
    ->getViewBuilder($this->entity
    ->getEntityTypeId());
  $build = $view_builder
    ->view($this->entity);
  return $this
    ->render($build);
}