function TwigExtensionTest::providerTestRenderVar
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::providerTestRenderVar()
- 10 core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::providerTestRenderVar()
- 11.x 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.