You are here

protected function WorkflowCustomStateTransitionAccessTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php \Drupal\Tests\workflows\Functional\WorkflowCustomStateTransitionAccessTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php, line 45

Class

WorkflowCustomStateTransitionAccessTest
Test custom provided workflow access for state/transition operations.

Namespace

Drupal\Tests\workflows\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->adminUser = $this
    ->createUser([
    'administer workflows',
  ]);
  $this->testWorkflow = Workflow::create([
    'label' => 'Test workflow',
    'id' => 'test_type',
    'type' => 'workflow_custom_access_type',
  ]);
  $this->testWorkflow
    ->save();
}