public function RendererTest::testRenderWithoutThemeArguments in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithoutThemeArguments()
- 10 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 751 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderWithoutThemeArguments() {
$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');
}