You are here

public function UserAccessControlHandlerTest::testNonExistingFieldAccess in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php \Drupal\Tests\user\Unit\UserAccessControlHandlerTest::testNonExistingFieldAccess()

Tests access to a non-existing base field.

@dataProvider NonExistingFieldAccessProvider

File

core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php, line 389
Contains \Drupal\Tests\user\Unit\UserAccessControlHandlerTest.

Class

UserAccessControlHandlerTest
Tests the user access controller.

Namespace

Drupal\Tests\user\Unit

Code

public function testNonExistingFieldAccess($viewer, $target, $view, $edit) {

  // By default everyone has access to all fields that do not have explicit
  // access control.
  // @see EntityAccessControlHandler::checkFieldAccess()
  $this
    ->assertFieldAccess('some_non_existing_field', $viewer, $target, $view, $edit);
}