You are here

public function OgMembershipTest::testGetGroupBundle in Organic groups 8

Tests getting the bundle of the group that is associated with a membership.

@covers ::getGroupBundle

File

tests/src/Kernel/Entity/OgMembershipTest.php, line 665

Class

OgMembershipTest
Tests the OgMembership entity.

Namespace

Drupal\Tests\og\Kernel\Entity

Code

public function testGetGroupBundle() {
  $membership = OgMembership::create();

  // Set a group.
  $membership
    ->setGroup($this->group);

  // Now the group bundle should be returned.
  $this
    ->assertEquals($this->group
    ->bundle(), $membership
    ->getGroupBundle());
}