function RendererTest::testRenderAccessCacheabilityDependencyInheritance
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderAccessCacheabilityDependencyInheritance()
- 8.9.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderAccessCacheabilityDependencyInheritance()
- 11.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderAccessCacheabilityDependencyInheritance()
@covers ::render @covers ::doRender
File
-
core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 632
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderAccessCacheabilityDependencyInheritance() : void {
$build = [
'#access' => AccessResult::allowed()->addCacheContexts([
'user',
]),
];
$this->renderer
->renderInIsolation($build);
$this->assertEqualsCanonicalizing([
'languages:language_interface',
'theme',
'user',
], $build['#cache']['contexts']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.