function AjaxRendererTest::testConstructorRendererArgument
@group legacy @expectedDeprecation The renderer service must be passed to Drupal\Core\Render\MainContent\AjaxRenderer::__construct and will be required before Drupal 9.0.0. See https://www.drupal.org/node/3009400
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ AjaxRendererTest.php, line 90
Class
- AjaxRendererTest
- @coversDefaultClass \Drupal\Core\Render\MainContent\AjaxRenderer @group Ajax
Namespace
Drupal\Tests\Core\ControllerCode
public function testConstructorRendererArgument() {
$element_info_manager = $this->createMock(ElementInfoManagerInterface::class);
$container = $this->createMock(ContainerInterface::class);
$container->expects($this->once())
->method('get')
->with('renderer')
->willReturn(NULL);
\Drupal::setContainer($container);
new AjaxRenderer($element_info_manager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.