function RendererTest::testRenderWithoutThemeArguments
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithoutThemeArguments()
- 8.9.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithoutThemeArguments()
- 11.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithoutThemeArguments()
@covers ::render @covers ::doRender
File
-
core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 757
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderWithoutThemeArguments() : void {
$element = [
'#theme' => 'common_test_foo',
];
$this->themeManager
->expects($this->once())
->method('render')
->with('common_test_foo', $this->defaultThemeVars + $element)
->willReturn('foobar');
// Test that defaults work.
$this->assertEquals('foobar', $this->renderer
->renderRoot($element), 'Defaults work');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.