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. 10 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()

Test 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 function operationCases() {
    return [
        [
            'create',
            'create workspace',
        ],
        [
            'view',
            'view any workspace',
        ],
        [
            'view',
            'view own workspace',
        ],
        [
            'update',
            'edit any workspace',
        ],
        [
            'update',
            'edit own workspace',
        ],
        [
            '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.