function WorkspaceAccessTest::operationCases

Same name in other branches
  1. 9 core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceAccessTest::operationCases()
  2. 8.9.x core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceAccessTest::operationCases()
  3. 11.x core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceAccessTest::operationCases()

Tests cases for testWorkspaceAccess().

Return value

array An array of operations and permissions to test with.

File

core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php, line 53

Class

WorkspaceAccessTest
Tests access on workspaces.

Namespace

Drupal\Tests\workspaces\Kernel

Code

public static function operationCases() {
    return [
        [
            'create',
            'administer workspaces',
        ],
        [
            'create',
            'create workspace',
        ],
        [
            'view',
            'administer workspaces',
        ],
        [
            'view',
            'view any workspace',
        ],
        [
            'view',
            'view own workspace',
        ],
        [
            'update',
            'administer workspaces',
        ],
        [
            'update',
            'edit any workspace',
        ],
        [
            'update',
            'edit own workspace',
        ],
        [
            'delete',
            'administer workspaces',
        ],
        [
            'delete',
            'delete any workspace',
        ],
        [
            'delete',
            'delete own workspace',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.