You are here

public function BlockOgMembershipActionTest::noAccessProvider in Organic groups 8

Data provider for testNoAccess().

Overrides ActionTestBase::noAccessProvider

File

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

Class

BlockOgMembershipActionTest
Tests the BlockOgMembership action plugin.

Namespace

Drupal\Tests\og\Kernel\Action

Code

public function noAccessProvider() {
  return [
    // Access is denied to users that are not privileged, and if the
    // membership is already blocked, or if it belongs to the group owner.
    [
      'uid1',
      'blocked',
    ],
    [
      'uid1',
      'group_owner',
    ],
    [
      'administrator',
      'blocked',
    ],
    [
      'administrator',
      'group_owner',
    ],
    [
      'group_administrator',
      'blocked',
    ],
    [
      'group_administrator',
      'group_owner',
    ],
    [
      'group_moderator',
      'blocked',
    ],
    [
      'group_moderator',
      'group_owner',
    ],
    [
      'group_owner',
      'blocked',
      TRUE,
    ],
    [
      'group_owner',
      'group_owner',
      TRUE,
    ],
    [
      'anonymous',
      'member',
    ],
    [
      'anonymous',
      'pending',
    ],
    [
      'anonymous',
      'blocked',
    ],
    [
      'anonymous',
      'group_administrator',
    ],
    [
      'anonymous',
      'group_moderator',
    ],
    [
      'anonymous',
      'group_owner',
    ],
    [
      'authenticated',
      'member',
    ],
    [
      'authenticated',
      'pending',
    ],
    [
      'authenticated',
      'blocked',
    ],
    [
      'authenticated',
      'group_administrator',
    ],
    [
      'authenticated',
      'group_moderator',
    ],
    [
      'authenticated',
      'group_owner',
    ],
    [
      'member',
      'member',
    ],
    [
      'member',
      'pending',
    ],
    [
      'member',
      'blocked',
    ],
    [
      'member',
      'group_administrator',
    ],
    [
      'member',
      'group_moderator',
    ],
    [
      'member',
      'group_owner',
    ],
    [
      'pending',
      'member',
    ],
    [
      'pending',
      'pending',
    ],
    [
      'pending',
      'blocked',
    ],
    [
      'pending',
      'group_administrator',
    ],
    [
      'pending',
      'group_moderator',
    ],
    [
      'pending',
      'group_owner',
    ],
    [
      'blocked',
      'member',
    ],
    [
      'blocked',
      'pending',
    ],
    [
      'blocked',
      'blocked',
    ],
    [
      'blocked',
      'group_administrator',
    ],
    [
      'blocked',
      'group_moderator',
    ],
    [
      'blocked',
      'group_owner',
    ],
    [
      'group_owner',
      'member',
      FALSE,
    ],
    [
      'group_owner',
      'pending',
      FALSE,
    ],
    [
      'group_owner',
      'blocked',
      FALSE,
    ],
    [
      'group_owner',
      'group_administrator',
      FALSE,
    ],
    [
      'group_owner',
      'group_moderator',
      FALSE,
    ],
    [
      'group_owner',
      'group_owner',
      FALSE,
    ],
  ];
}