public function RendererTest::testRenderChildrenAccess in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderChildrenAccess()
- 10 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderChildrenAccess()
Ensures that #access is taken in account when rendering #render_children.
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 702 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderChildrenAccess() {
$build = [
'#access' => FALSE,
'#render_children' => TRUE,
'child' => [
'#markup' => 'kittens',
],
];
$this
->assertEquals('', $this->renderer
->renderRoot($build));
}