public function RenderTest::testRenderChildren in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Render/RenderTest.php \Drupal\KernelTests\Core\Render\RenderTest::testRenderChildren()
Ensures that render array children are processed correctly.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Render/ RenderTest.php, line 49
Class
- RenderTest
- Performs functional tests on drupal_render().
Namespace
Drupal\KernelTests\Core\RenderCode
public function testRenderChildren() {
// Ensure that #prefix and #suffix is only being printed once since that is
// the behavior the caller code expects.
$build = [
'#type' => 'container',
'#theme' => 'theme_test_render_element_children',
'#prefix' => 'kangaroo',
'#suffix' => 'kitten',
];
$this
->render($build);
$this
->removeWhiteSpace();
$this
->assertNoRaw('<div>kangarookitten</div>');
}