public function DisableFieldTest::testDisableFieldOnAddFormEnableForAllRoles in Disable Field 8.2
Enable the field for all roles on the content add form.
File
- tests/
src/ Functional/ DisableFieldTest.php, line 113
Class
- DisableFieldTest
- Disable field tests.
Namespace
Drupal\Tests\disable_field\FunctionalCode
public function testDisableFieldOnAddFormEnableForAllRoles() : void {
$this
->fieldUIAddNewField('admin/structure/types/manage/test', 'test', 'Test field', 'string');
$this
->drupalGet('node/add/test');
$this
->checkIfFieldIsNotDisabledByFieldName('field_test');
$this
->drupalLogin($this->user1);
$this
->drupalGet('node/add/test');
$this
->checkIfFieldIsNotDisabledByFieldName('field_test');
$this
->drupalLogin($this->user2);
$this
->drupalGet('node/add/test');
$this
->checkIfFieldIsNotDisabledByFieldName('field_test');
}