protected function RendererTest::setupThemeContainer in Drupal 8
1 call to RendererTest::setupThemeContainer()
- RendererTest::providerTestRenderBasic in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php - Provides a list of render arrays to test basic rendering.
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 733 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
protected function setupThemeContainer($matcher = NULL) {
$this->themeManager
->expects($matcher ?: $this
->at(1))
->method('render')
->with('container', $this
->anything())
->willReturnCallback(function ($theme, $vars) {
return '<div' . (string) new Attribute($vars['#attributes']) . '>' . $vars['#children'] . "</div>\n";
});
}