function RendererTest::testDeprecatedAccess

Attributes

#[IgnoreDeprecations]

File

core/tests/Drupal/Tests/Core/Render/RendererTest.php, line 1212

Class

RendererTest
Tests Drupal\Core\Render\Renderer.

Namespace

Drupal\Tests\Core\Render

Code

public function testDeprecatedAccess() : void {
  $build = [
    '#markup' => 'foo',
    '#access' => 'bar',
  ];
  $this->expectDeprecation('Using a #access value other than a boolean or an AccessResultInterface object is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. See https://www.drupal.org/node/3549344');
  $this->renderer
    ->renderRoot($build);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.