public function RendererTest::testRenderWithAccessCallbackCallable in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithAccessCallbackCallable()
- 10 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::testRenderWithAccessCallbackCallable()
@covers ::render @covers ::doRender
@dataProvider providerAccessValues
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 562 - Contains \Drupal\Tests\Core\Render\RendererTest.
Class
- RendererTest
- @coversDefaultClass \Drupal\Core\Render\Renderer @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderWithAccessCallbackCallable($access) {
$build = [
'#access_callback' => function () use ($access) {
return $access;
},
];
$this
->assertAccess($build, $access);
}