You are here

public function RendererPlaceholdersTest::testInvalidLazyBuilderArguments in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\RendererPlaceholdersTest::testInvalidLazyBuilderArguments()

@covers ::render @covers ::doRender

@expectedException \DomainException @expectedExceptionMessage The #lazy_builder property must have an array as a value, containing two values: the callback, and the arguments for the callback.

File

core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php, line 831
Contains \Drupal\Tests\Core\Render\RendererPlaceholdersTest.

Class

RendererPlaceholdersTest
@coversDefaultClass \Drupal\Core\Render\Renderer @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function testInvalidLazyBuilderArguments() {
  $element = [];
  $element['#lazy_builder'] = [
    '\\Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
    'arg1',
    'arg2',
  ];
  $this->renderer
    ->renderRoot($element);
}