You are here

public function ChangeOgMembershipActionTestBase::accessProvider in Organic groups 8

Data provider for testAccess().

Overrides ActionTestBase::accessProvider

File

tests/src/Kernel/Action/ChangeOgMembershipActionTestBase.php, line 15

Class

ChangeOgMembershipActionTestBase
Base class for testing action plugins that change membership roles.

Namespace

Drupal\Tests\og\Kernel\Action

Code

public function accessProvider() {
  return [
    // The super user has access to this action for all member types.
    [
      'uid1',
      'member',
    ],
    [
      'uid1',
      'pending',
    ],
    [
      'uid1',
      'blocked',
    ],
    [
      'uid1',
      'group_administrator',
    ],
    [
      'uid1',
      'group_moderator',
    ],
    // A global administrator has access to this action for all member types.
    [
      'administrator',
      'member',
    ],
    [
      'administrator',
      'pending',
    ],
    [
      'administrator',
      'blocked',
    ],
    [
      'administrator',
      'group_administrator',
    ],
    [
      'administrator',
      'group_moderator',
    ],
    // A group administrator has access to this action for all member types.
    [
      'group_administrator',
      'member',
    ],
    [
      'group_administrator',
      'pending',
    ],
    [
      'group_administrator',
      'blocked',
    ],
    [
      'group_administrator',
      'group_administrator',
    ],
    [
      'group_administrator',
      'group_moderator',
    ],
    // A group moderator has access to this action for all member types.
    [
      'group_administrator',
      'member',
    ],
    [
      'group_administrator',
      'pending',
    ],
    [
      'group_administrator',
      'blocked',
    ],
    [
      'group_administrator',
      'group_administrator',
    ],
    [
      'group_administrator',
      'group_moderator',
    ],
    // A group owner has access to this action for all member types, if the
    // 'group_administrator_full_access' configuration option is set.
    [
      'group_owner',
      'member',
      TRUE,
    ],
    [
      'group_owner',
      'pending',
      TRUE,
    ],
    [
      'group_owner',
      'blocked',
      TRUE,
    ],
    [
      'group_owner',
      'group_administrator',
      TRUE,
    ],
    [
      'group_owner',
      'group_moderator',
      TRUE,
    ],
  ];
}