You are here

public function GroupTest::testRemoveMember in Group 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/GroupTest.php \Drupal\Tests\group\Kernel\GroupTest::testRemoveMember()

Tests the removal of a member from a group.

@covers ::removeMember @depends testAddMember

File

tests/src/Kernel/GroupTest.php, line 49

Class

GroupTest
Tests the general behavior of group entities.

Namespace

Drupal\Tests\group\Kernel

Code

public function testRemoveMember() {
  $account = $this
    ->createUser();
  $this->group
    ->addMember($account);
  $this->group
    ->removeMember($account);
  $this
    ->assertFalse($this->group
    ->getMember($account), 'Successfully removed a member.');
}