function FilterLegacyTest::testFilterFormAccessDenied
Tests filter_form_access_denied() deprecation.
@expectedDeprecation filter_form_access_denied() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use \Drupal\filter\Element\TextFormat::accessDeniedCallback() instead. See https://www.drupal.org/node/2966725
File
-
core/
modules/ filter/ tests/ src/ Kernel/ FilterLegacyTest.php, line 25
Class
- FilterLegacyTest
- Tests Filter module's legacy code.
Namespace
Drupal\Tests\filter\KernelCode
public function testFilterFormAccessDenied() {
$element = filter_form_access_denied([]);
$this->assertEquals('This field has been disabled because you do not have sufficient permissions to edit it.', $element['#value']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.