You are here

public function PrivateAccessTest::testHasFieldAccess in Field Permissions 8

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

Test for `hasFieldAccess`.

@covers ::hasFieldAccess

@dataProvider providerTestHasFieldAccess

File

tests/src/Unit/Plugin/FieldPermissionType/PrivateAccessTest.php, line 47

Class

PrivateAccessTest
Tests the private access 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));
}