public function TranslationTest::testFieldAccess in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Kernel/TranslationTest.php \Drupal\Tests\field\Kernel\TranslationTest::testFieldAccess()
- 9 core/modules/field/tests/src/Kernel/TranslationTest.php \Drupal\Tests\field\Kernel\TranslationTest::testFieldAccess()
Tests field access.
Regression test to verify that fieldAccess() can be called while only passing the required parameters.
See also
https://www.drupal.org/node/2404739
File
- core/
modules/ field/ tests/ src/ Kernel/ TranslationTest.php, line 206
Class
- TranslationTest
- Tests multilanguage fields logic.
Namespace
Drupal\Tests\field\KernelCode
public function testFieldAccess() {
$access_control_handler = \Drupal::entityTypeManager()
->getAccessControlHandler($this->entityType);
$this
->assertTrue($access_control_handler
->fieldAccess('view', $this->field));
}