You are here

public function ActiveWorkspaceCheckTest::providerTestAccess in Drupal 8

Same name and namespace in other branches
  1. 9 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',
      ],
    ],
  ];
}