You are here

private function BlockViewBuilderTest::renderPlain in Twig Tweak 3.x

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

Renders a render array.

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

File

tests/src/Kernel/BlockViewBuilderTest.php, line 153

Class

BlockViewBuilderTest
A test for BlockViewBuilder.

Namespace

Drupal\Tests\twig_tweak\Kernel

Code

private function renderPlain(array $build) : string {
  $renderer = $this->container
    ->get('renderer');
  return rtrim(preg_replace('#\\s{2,}#', '', $renderer
    ->renderPlain($build)));
}