You are here

public function WorkflowStateTransitionOperationsAccessCheckTest::accessTestCases in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php \Drupal\Tests\workflows\Unit\WorkflowStateTransitionOperationsAccessCheckTest::accessTestCases()
  2. 10 core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php \Drupal\Tests\workflows\Unit\WorkflowStateTransitionOperationsAccessCheckTest::accessTestCases()

Test cases for ::testAccess.

File

core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php, line 51

Class

WorkflowStateTransitionOperationsAccessCheckTest
@coversDefaultClass \Drupal\workflows\WorkflowStateTransitionOperationsAccessCheck @group workflows

Namespace

Drupal\Tests\workflows\Unit

Code

public function accessTestCases() {
  return [
    'Transition add' => [
      'add-transition',
      'add-transition',
    ],
    'Transition update' => [
      'update-transition',
      'update-transition:foo-transition',
      [
        'workflow_transition' => 'foo-transition',
      ],
    ],
    'Transition delete' => [
      'delete-transition',
      'delete-transition:foo-transition',
      [
        'workflow_transition' => 'foo-transition',
      ],
    ],
    'State add' => [
      'add-state',
      'add-state',
    ],
    'State update' => [
      'update-state',
      'update-state:bar-state',
      [
        'workflow_state' => 'bar-state',
      ],
    ],
    'State delete' => [
      'delete-state',
      'delete-state:bar-state',
      [
        'workflow_state' => 'bar-state',
      ],
    ],
  ];
}