You are here

public function BlockOgMembershipActionTest::accessProvider in Organic groups 8

Data provider for testAccess().

Overrides ActionTestBase::accessProvider

File

tests/src/Kernel/Action/BlockOgMembershipActionTest.php, line 55

Class

BlockOgMembershipActionTest
Tests the BlockOgMembership action plugin.

Namespace

Drupal\Tests\og\Kernel\Action

Code

public function accessProvider() {
  return [
    // Access should be provided if the membership is not already blocked and
    // does not belong to the group owner, and the user executing the action
    // is a privileged user.
    [
      'uid1',
      'member',
    ],
    [
      'uid1',
      'pending',
    ],
    [
      'uid1',
      'group_administrator',
    ],
    [
      'uid1',
      'group_moderator',
    ],
    [
      'administrator',
      'member',
    ],
    [
      'administrator',
      'pending',
    ],
    [
      'administrator',
      'group_administrator',
    ],
    [
      'administrator',
      'group_moderator',
    ],
    [
      'group_administrator',
      'member',
    ],
    [
      'group_administrator',
      'pending',
    ],
    [
      'group_administrator',
      'group_administrator',
    ],
    [
      'group_administrator',
      'group_moderator',
    ],
    [
      'group_moderator',
      'member',
    ],
    [
      'group_moderator',
      'pending',
    ],
    [
      'group_moderator',
      'group_administrator',
    ],
    [
      'group_moderator',
      'group_moderator',
    ],
    [
      'group_owner',
      'member',
      TRUE,
    ],
    [
      'group_owner',
      'pending',
      TRUE,
    ],
    [
      'group_owner',
      'group_administrator',
      TRUE,
    ],
    [
      'group_owner',
      'group_moderator',
      TRUE,
    ],
  ];
}