You are here

public function TranslationTest::testFieldAccess in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/field/src/Tests/TranslationTest.php \Drupal\field\Tests\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/src/Tests/TranslationTest.php, line 203
Contains \Drupal\field\Tests\TranslationTest.

Class

TranslationTest
Tests multilanguage fields logic.

Namespace

Drupal\field\Tests

Code

public function testFieldAccess() {
  $access_control_handler = \Drupal::entityManager()
    ->getAccessControlHandler($this->entityType);
  $this
    ->assertTrue($access_control_handler
    ->fieldAccess('view', $this->field));
}