protected function FieldPermissionsNodeTest::addNodeUi in Field Permissions 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/FieldPermissionsNodeTest.php \Drupal\Tests\field_permissions\Functional\FieldPermissionsNodeTest::addNodeUi()
Create a node through the UI.
1 call to FieldPermissionsNodeTest::addNodeUi()
- FieldPermissionsNodeTest::checkInitAddNode in tests/
src/ Functional/ FieldPermissionsNodeTest.php - Test create content.
File
- tests/
src/ Functional/ FieldPermissionsNodeTest.php, line 83
Class
- FieldPermissionsNodeTest
- Test field permissions on nodes.
Namespace
Drupal\Tests\field_permissions\FunctionalCode
protected function addNodeUi() {
$this
->drupalGet('node/add/article');
$this
->assertSession()
->pageTextContains('Body');
$edit = [];
$node_name = $this
->randomMachineName();
$edit['body[0][value]'] = $this
->randomString();
$edit['title[0][value]'] = $node_name;
$this
->submitForm($edit, 'Save');
$this
->assertSession()
->pageTextContains(t('Article @name has been created.', [
'@name' => $node_name,
]));
}