public function ApprovePendingOgMembershipActionTest::testExecute in Organic groups 8
Checks if the action can be performed correctly.
@covers ::execute @dataProvider executeProvider
Parameters
string $membership: The membership on which to perform the action.
Overrides ActionTestBase::testExecute
File
- tests/
src/ Kernel/ Action/ ApprovePendingOgMembershipActionTest.php, line 31
Class
- ApprovePendingOgMembershipActionTest
- Tests the ApprovePendingOgMembership action plugin.
Namespace
Drupal\Tests\og\Kernel\ActionCode
public function testExecute($membership = NULL) {
$membership = $this->memberships[$membership];
/** @var \Drupal\og\Plugin\Action\AddSingleOgMembershipRole $plugin */
$plugin = $this
->getPlugin();
$plugin
->execute($membership);
$this
->assertEquals(OgMembershipInterface::STATE_ACTIVE, $membership
->getState());
}