You are here

public function PendingOgMembershipActionTest::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/PendingOgMembershipActionTest.php, line 31

Class

PendingOgMembershipActionTest
Tests the PendingOgMembership action plugin.

Namespace

Drupal\Tests\og\Kernel\Action

Code

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_PENDING, $membership
    ->getState());
}