public function RendererTest::testRenderAccessCacheabilityDependencyInheritance in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderAccessCacheabilityDependencyInheritance()
- 9 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 629 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderAccessCacheabilityDependencyInheritance() {
$build = [
'#access' => AccessResult::allowed()
->addCacheContexts([
'user',
]),
];
$this->renderer
->renderPlain($build);
$this
->assertEqualsCanonicalizing([
'languages:language_interface',
'theme',
'user',
], $build['#cache']['contexts']);
}