function RendererTest::setupThemeContainer
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
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";
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.