protected function FieldPermissionsUserTest::assertUserEditFieldAccess in Field Permissions 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/FieldPermissionsUserTest.php \Drupal\Tests\field_permissions\Functional\FieldPermissionsUserTest::assertUserEditFieldAccess()
Verifies that the current logged in user can edit the user field.
Parameters
\Drupal\user\UserInterface $account: The user account to edit.
2 calls to FieldPermissionsUserTest::assertUserEditFieldAccess()
- 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.
File
- tests/
src/ Functional/ FieldPermissionsUserTest.php, line 142
Class
- FieldPermissionsUserTest
- Test field permissions on users.
Namespace
Drupal\Tests\field_permissions\FunctionalCode
protected function assertUserEditFieldAccess(UserInterface $account) {
$this
->drupalGet($account
->toUrl('edit-form'));
$this
->assertSession()
->pageTextContains('Textfield');
}