public function OgMembershipTest::testGetSetOwnerId in Organic groups 8
Tests getting and setting owners by ID on OgMemberships.
@covers ::getOwner @covers ::getOwnerId @covers ::setOwnerId
File
- tests/
src/ Kernel/ Entity/ OgMembershipTest.php, line 173
Class
- OgMembershipTest
- Tests the OgMembership entity.
Namespace
Drupal\Tests\og\Kernel\EntityCode
public function testGetSetOwnerId() {
$membership = OgMembership::create();
$membership
->setOwnerId($this->user
->id())
->setGroup($this->group)
->save();
$this
->assertOwner($membership);
}