You are here

protected function ComponentsTest::render in Components! 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Functional/ComponentsTest.php \Drupal\Tests\components\Functional\ComponentsTest::render()

Renders a render array.

Parameters

array $elements: The elements to render.

Return value

string The rendered string output (typically HTML).

1 call to ComponentsTest::render()
ComponentsTest::testLoadTemplate in tests/src/Functional/ComponentsTest.php
Ensures component templates can be loaded inside a Drupal instance.

File

tests/src/Functional/ComponentsTest.php, line 41

Class

ComponentsTest
Tests the components module in a fully loaded Drupal instance.

Namespace

Drupal\Tests\components\Functional

Code

protected function render(array &$elements) : string {
  return $this->container
    ->get('renderer')
    ->renderRoot($elements);
}