You are here

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\Kernel

Code

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');
}