function RendererTest::testRenderChildrenAccess
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderChildrenAccess()
- 8.9.x 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 706
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderChildrenAccess() : void {
$build = [
'#access' => FALSE,
'#render_children' => TRUE,
'child' => [
'#markup' => 'kittens',
],
];
$this->assertEquals('', $this->renderer
->renderRoot($build));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.