You are here

protected function LayoutTest::render in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php \Drupal\Tests\layout_discovery\Kernel\LayoutTest::render()

Renders a render array.

Parameters

array $elements: The elements to render.

Return value

string The rendered string output (typically HTML).

Overrides KernelTestBase::render

1 call to LayoutTest::render()
LayoutTest::testRenderLayout in core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
Tests rendering a layout.

File

core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php, line 83

Class

LayoutTest
Tests Layout functionality.

Namespace

Drupal\Tests\layout_discovery\Kernel

Code

protected function render(array &$elements) {
  $content = parent::render($elements);

  // Strip leading whitespace from every line.
  $this->content = preg_replace('/^\\s+/m', '', $content);
  return $this->content;
}