You are here

private function EntityViewBuilderTest::renderPlain in Twig Tweak 3.1.x

Same name and namespace in other branches
  1. 3.x tests/src/Kernel/EntityViewBuilderTest.php \Drupal\Tests\twig_tweak\Kernel\EntityViewBuilderTest::renderPlain()

Renders a render array.

1 call to EntityViewBuilderTest::renderPlain()
EntityViewBuilderTest::testEntityViewBuilder in tests/src/Kernel/EntityViewBuilderTest.php
Test callback.

File

tests/src/Kernel/EntityViewBuilderTest.php, line 190

Class

EntityViewBuilderTest
A test for EntityViewBuilder.

Namespace

Drupal\Tests\twig_tweak\Kernel

Code

private function renderPlain(array $build) : string {
  $actual_html = $this->container
    ->get('renderer')
    ->renderPlain($build);
  $actual_html = preg_replace('#<footer>.+</footer>#s', '', $actual_html);
  return $actual_html;
}