function RendererTest::testRenderWithAccessPropertyAndCallback
Ensures that the #access property wins over the callable.
@legacy-covers ::render @legacy-covers ::doRender
Attributes
#[DataProvider('providerAccessValues')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 636
Class
Namespace
Drupal\Tests\Core\RenderCode
public function testRenderWithAccessPropertyAndCallback($access) : void {
$build = [
'#access' => $access,
'#access_callback' => function () {
return TRUE;
},
];
$this->assertAccess($build, $access);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.