You are here

public function CustomAccessTest::testHasFieldAccess in Field Permissions 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/Plugin/FieldPermissionType/CustomAccessTest.php \Drupal\Tests\field_permissions\Unit\Plugin\FieldPermissionType\CustomAccessTest::testHasFieldAccess()

Test for `hasFieldAccess`.

@covers ::hasFieldAccess

@dataProvider providerTestHasFieldAccess

File

tests/src/Unit/Plugin/FieldPermissionType/CustomAccessTest.php, line 48

Class

CustomAccessTest
Tests for the custom access permission type plugin.

Namespace

Drupal\Tests\field_permissions\Unit\Plugin\FieldPermissionType

Code

public function testHasFieldAccess($operation, EntityInterface $entity, AccountInterface $account, $access) {
  $this
    ->assertEquals($access, $this->plugin
    ->hasFieldAccess($operation, $entity, $account));
}