public function RendererPlaceholdersTest::testCreatePlaceholderPropertyWithoutLazyBuilder in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\RendererPlaceholdersTest::testCreatePlaceholderPropertyWithoutLazyBuilder()
@covers ::render @covers ::doRender
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererPlaceholdersTest.php, line 956 - Contains \Drupal\Tests\Core\Render\RendererPlaceholdersTest.
Class
- RendererPlaceholdersTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @covers \Drupal\Core\Render\RenderCache @covers \Drupal\Core\Render\PlaceholderingRenderCache @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testCreatePlaceholderPropertyWithoutLazyBuilder() {
$element = [];
$element['#create_placeholder'] = TRUE;
$this
->expectException(\LogicException::class);
$this
->expectExceptionMessage('When #create_placeholder is set, a #lazy_builder callback must be present as well.');
$this->renderer
->renderRoot($element);
}