function ActiveWorkspaceCheckTest::providerTestAccess

Same name in other branches
  1. 9 core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php \Drupal\Tests\workspaces\Unit\ActiveWorkspaceCheckTest::providerTestAccess()
  2. 10 core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php \Drupal\Tests\workspaces\Unit\ActiveWorkspaceCheckTest::providerTestAccess()
  3. 11.x core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php \Drupal\Tests\workspaces\Unit\ActiveWorkspaceCheckTest::providerTestAccess()

Provides data for the testAccess method.

Return value

array

File

core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php, line 47

Class

ActiveWorkspaceCheckTest
@coversDefaultClass \Drupal\workspaces\Access\ActiveWorkspaceCheck

Namespace

Drupal\Tests\workspaces\Unit

Code

public function providerTestAccess() {
    return [
        [
            [],
            FALSE,
            FALSE,
        ],
        [
            [],
            TRUE,
            FALSE,
        ],
        [
            [
                '_has_active_workspace' => 'TRUE',
            ],
            TRUE,
            TRUE,
            [
                'workspace',
            ],
        ],
        [
            [
                '_has_active_workspace' => 'TRUE',
            ],
            FALSE,
            FALSE,
            [
                'workspace',
            ],
        ],
        [
            [
                '_has_active_workspace' => 'FALSE',
            ],
            TRUE,
            FALSE,
            [
                'workspace',
            ],
        ],
        [
            [
                '_has_active_workspace' => 'FALSE',
            ],
            FALSE,
            TRUE,
            [
                'workspace',
            ],
        ],
    ];
}

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