You are here

protected property ModerationDashboardPermissionTest::$canNotViewOtherDashboardCases in Moderation Dashboard 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/ModerationDashboardPermissionTest.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardPermissionTest::canNotViewOtherDashboardCases

The test data.

Type: array

File

tests/src/Functional/ModerationDashboardPermissionTest.php, line 175

Class

ModerationDashboardPermissionTest
Tests moderation dashboard permissions.

Namespace

Drupal\Tests\moderation_dashboard\Functional

Code

protected $canNotViewOtherDashboardCases = [
  // User B doesn't have a dashboard, therefore nobody can view it.
  [
    'permissions_a' => [],
    'permissions_b' => [],
  ],
  [
    'permissions_a' => [],
    'permissions_b' => [
      'view any moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [
      'view any moderation dashboard',
    ],
    'permissions_b' => [],
  ],
  [
    'permissions_a' => [
      'view any moderation dashboard',
    ],
    'permissions_b' => [
      'view any moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [
      'view any moderation dashboard',
      'use moderation dashboard',
    ],
    'permissions_b' => [],
  ],
  [
    'permissions_a' => [
      'view any moderation dashboard',
      'use moderation dashboard',
    ],
    'permissions_b' => [
      'view any moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [
      'use moderation dashboard',
    ],
    'permissions_b' => [],
  ],
  [
    'permissions_a' => [
      'use moderation dashboard',
    ],
    'permissions_b' => [
      'view any moderation dashboard',
    ],
  ],
  // User A doesn't have permission to view User B's dashboard.
  [
    'permissions_a' => [],
    'permissions_b' => [
      'use moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [],
    'permissions_b' => [
      'view any moderation dashboard',
      'use moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [
      'use moderation dashboard',
    ],
    'permissions_b' => [
      'use moderation dashboard',
    ],
  ],
  [
    'permissions_a' => [
      'use moderation dashboard',
    ],
    'permissions_b' => [
      'view any moderation dashboard',
      'use moderation dashboard',
    ],
  ],
];