public function OgMembershipTest::testIsOwner in Organic groups 8
Tests that the membership can return if it belongs to the group owner.
@covers ::isOwner
File
- tests/
src/ Kernel/ Entity/ OgMembershipTest.php, line 828
Class
- OgMembershipTest
- Tests the OgMembership entity.
Namespace
Drupal\Tests\og\Kernel\EntityCode
public function testIsOwner() {
// Check the membership of the group owner.
$membership = Og::createMembership($this->group, $this->owner);
$this
->assertTrue($membership
->isOwner());
// Check the membership of a normal user.
$membership = Og::createMembership($this->group, $this->user);
$this
->assertFalse($membership
->isOwner());
}