protected function KernelTestBase::render in Zircon Profile 8
Same name in this branch
- 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::render()
- 8 core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::render()
Same name and namespace in other branches
- 8.0 core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::render()
Renders a render array.
Parameters
array $elements: The elements to render.
Return value
string The rendered string output (typically HTML).
44 calls to KernelTestBase::render()
- AggregatorTitleTest::testStringFormatter in core/
modules/ aggregator/ src/ Tests/ AggregatorTitleTest.php - BooleanFormatterTest::renderEntityFields in core/
modules/ field/ src/ Tests/ Boolean/ BooleanFormatterTest.php - Renders fields of a given entity with a given display.
- DisplayApiTest::testFieldEmpty in core/
modules/ field/ src/ Tests/ DisplayApiTest.php - Tests that the prepareView() formatter method still fires for empty values.
- DisplayApiTest::testFieldItemListView in core/
modules/ field/ src/ Tests/ DisplayApiTest.php - Tests the FieldItemListInterface::view() method.
- DisplayApiTest::testFieldItemView in core/
modules/ field/ src/ Tests/ DisplayApiTest.php - Tests the FieldItemInterface::view() method.
File
- core/
modules/ simpletest/ src/ KernelTestBase.php, line 588 - Contains \Drupal\simpletest\KernelTestBase.
Class
- KernelTestBase
- Base class for integration tests.
Namespace
Drupal\simpletestCode
protected function render(array &$elements) {
// Use the bare HTML page renderer to render our links.
$renderer = $this->container
->get('bare_html_page_renderer');
$response = $renderer
->renderBarePage($elements, '', $this->container
->get('theme.manager')
->getActiveTheme()
->getName());
// Glean the content from the response object.
$content = $response
->getContent();
$this
->setRawContent($content);
$this
->verbose('<pre style="white-space: pre-wrap">' . Html::escape($content));
return $content;
}