protected function MemberCountBlockTest::addMember in Organic groups 8
Adds a member with the given membership state to the given group.
Parameters
int $group_key: The key of the group to which a member should be added.
string $state: The membership state to assign to the newly added member.
Return value
\Drupal\og\OgMembershipInterface The membership entity for the newly added member.
1 call to MemberCountBlockTest::addMember()
- MemberCountBlockTest::testMemberCountBlock in tests/
src/ Kernel/ Plugin/ Block/ MemberCountBlockTest.php - Tests the member count block.
File
- tests/
src/ Kernel/ Plugin/ Block/ MemberCountBlockTest.php, line 293
Class
- MemberCountBlockTest
- Tests the member count block.
Namespace
Drupal\Tests\og\Kernel\Plugin\BlockCode
protected function addMember($group_key, $state) {
$user = $this
->createUser();
return $this
->createOgMembership($this->groups[$group_key], $user, NULL, $state);
}