public function ManageDisplayTest::testNestField in Field Group 8
Same name and namespace in other branches
- 8.3 tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_group\Functional\ManageDisplayTest::testNestField()
Nest a field underneath a group.
File
- tests/
src/ Functional/ ManageDisplayTest.php, line 141
Class
- ManageDisplayTest
- Tests for managing display of entities.
Namespace
Drupal\Tests\field_group\FunctionalCode
public function testNestField() {
$data = array(
'format_type' => 'fieldset',
);
$group = $this
->createGroup('node', $this->type, 'form', 'default', $data);
$edit = array(
'fields[body][parent]' => $group->group_name,
);
$this
->drupalPostForm('admin/structure/types/manage/' . $this->type . '/form-display', $edit, 'Save');
$this
->assertRaw('Your settings have been saved.');
$group = field_group_load_field_group($group->group_name, 'node', $this->type, 'form', 'default');
$this
->assertTrue(in_array('body', $group->children), t('Body is a child of %group', array(
'%group' => $group->group_name,
)));
}