public function SubgroupTest::testDeleteSubgroup in Subgroup (Graph) 1.0.x
Tests the removing subgroup.
File
- tests/
src/ Kernel/ SubgroupTest.php, line 76
Class
- SubgroupTest
- Tests the behavior of subgroup creators.
Namespace
Drupal\Tests\ggroup\KernelCode
public function testDeleteSubgroup() {
list($group, $sub_group) = $this
->addGroup();
/* @var Group $subGroup */
$sub_group
->delete();
$this
->assertEquals(\Drupal::service('ggroup.group_hierarchy_manager')
->groupHasSubgroup($group, $sub_group), FALSE, 'Subgroup is removed');
}