function WorkflowCustomStateTransitionAccessTest::setUp

Same name in other branches
  1. 8.9.x core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php \Drupal\Tests\workflows\Functional\WorkflowCustomStateTransitionAccessTest::setUp()
  2. 10 core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php \Drupal\Tests\workflows\Functional\WorkflowCustomStateTransitionAccessTest::setUp()
  3. 11.x 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();
}

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