public function RendererTest::testRenderWithoutThemeArguments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 573 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderWithoutThemeArguments() {
$element = array(
'#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($this->renderer
->renderRoot($element), 'foobar', 'Defaults work');
}