| 1 field_group.ui.test | public GroupUITestCase::deleteGroup() |
Delete a group.
File
- core/
modules/ field_group/ tests/ field_group.ui.test, line 57 - Test file for Field Group UI.
Class
- GroupUITestCase
- Test the Field Group UI.
Code
public function deleteGroup() {
$this->backdropPost('admin/structure/types/manage/post/groups/' . $this->group_name . '/delete/form', array(), t('Delete'));
$this->assertRaw(t('The group %label has been deleted from the %post content type.', array(
'%label' => $this->group_label,
'%post' => 'Post'),
), t('Group removal message displayed on screen.'));
// Test that group is not in the $groups array.
$groups = field_group_info_groups('node', 'post', 'form', TRUE);
$this->assertFalse(array_key_exists($this->group_name, $groups), t('Group not found in groups array while deleting'));
$this->backdropPost('admin/structure/types/manage/post/groups/' . $this->group_name . '/delete/default', array(), t('Delete'));
$this->assertRaw(t('The group %label has been deleted from the %post content type.', array(
'%label' => $this->group_label,
'%post' => 'Post',
)), t('Group removal message displayed on screen.'));
// Test that group is not in the $groups array.
$groups = field_group_info_groups('node', 'post', 'default', TRUE);
$this->assertFalse(array_key_exists($this->group_name, $groups), t('Group not found in groups array while deleting'));
}