protected function FieldPermissionsNodeTest::checkChengeToPrivateField in Field Permissions 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/FieldPermissionsNodeTest.php \Drupal\Tests\field_permissions\Functional\FieldPermissionsNodeTest::checkChengeToPrivateField()
Test PUBLIC - PRIVATE EDIT - VIEW.
1 call to FieldPermissionsNodeTest::checkChengeToPrivateField()
- FieldPermissionsNodeTest::testNodeFieldPermissions in tests/
src/ Functional/ FieldPermissionsNodeTest.php - Test field permissions on nodes.
File
- tests/
src/ Functional/ FieldPermissionsNodeTest.php, line 172
Class
- FieldPermissionsNodeTest
- Test field permissions on nodes.
Namespace
Drupal\Tests\field_permissions\FunctionalCode
protected function checkChengeToPrivateField() {
$this
->drupalLogin($this->webUser);
$this
->assertNodeFieldVisible();
$this->webUserRole
->grantPermission('administer field permissions')
->save();
$this
->setNodeFieldPermissions(FieldPermissionTypeInterface::ACCESS_PRIVATE);
$this
->assertNodeFieldHidden();
$this->webUserRole
->grantPermission('access private fields')
->save();
$this
->assertNodeFieldVisible();
$this
->drupalLogout();
}