protected function FieldPermissionsUserTest::assertUserFieldAccess in Field Permissions 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/FieldPermissionsUserTest.php \Drupal\Tests\field_permissions\Functional\FieldPermissionsUserTest::assertUserFieldAccess()
Verify the test field is accessible when viewing the given user.
Parameters
\Drupal\user\UserInterface $account: The account to verify field permissions for viewing.
4 calls to FieldPermissionsUserTest::assertUserFieldAccess()
- FieldPermissionsUserTest::checkPrivateField in tests/
src/ Functional/ FieldPermissionsUserTest.php - Test field access with private permissions.
- FieldPermissionsUserTest::checkUserViewEditField in tests/
src/ Functional/ FieldPermissionsUserTest.php - Tests custom permissions.
- FieldPermissionsUserTest::checkUserViewEditOwnField in tests/
src/ Functional/ FieldPermissionsUserTest.php - Test PUBLIC - view_own and edit_own field.
- FieldPermissionsUserTest::testUserFieldPermissions in tests/
src/ Functional/ FieldPermissionsUserTest.php - Test field permissions on user entities.
File
- tests/
src/ Functional/ FieldPermissionsUserTest.php, line 119
Class
- FieldPermissionsUserTest
- Test field permissions on users.
Namespace
Drupal\Tests\field_permissions\FunctionalCode
protected function assertUserFieldAccess(UserInterface $account) {
$this
->drupalGet($account
->toUrl());
$this
->assertSession()
->pageTextContains('Textfield');
}