public function TwigExtensionTest::providerTestRenderVar in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::providerTestRenderVar()
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php, line 292
Class
- TwigExtensionTest
- Tests the twig extension.
Namespace
Drupal\Tests\Core\TemplateCode
public function providerTestRenderVar() {
$data = [];
$renderable = $this
->prophesize(RenderableInterface::class);
$render_array = [
'#type' => 'test',
'#var' => 'giraffe',
];
$renderable
->toRenderable()
->willReturn($render_array);
$data['renderable'] = [
$render_array,
$renderable
->reveal(),
];
return $data;
}