function WorkflowAccessControlHandlerTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php \Drupal\Tests\workflows\Kernel\WorkflowAccessControlHandlerTest::setUp()
  2. 10 core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php \Drupal\Tests\workflows\Kernel\WorkflowAccessControlHandlerTest::setUp()
  3. 11.x core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php \Drupal\Tests\workflows\Kernel\WorkflowAccessControlHandlerTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php, line 54

Class

WorkflowAccessControlHandlerTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21workflows%21src%21WorkflowAccessControlHandler.php/class/WorkflowAccessControlHandler/8.9.x" title="Access controller for the Workflow entity." class="local">\Drupal\workflows\WorkflowAccessControlHandler</a> @group workflows

Namespace

Drupal\Tests\workflows\Kernel

Code

protected function setUp() {
    parent::setUp();
    $this->installEntitySchema('workflow');
    $this->installEntitySchema('user');
    $this->installSchema('system', [
        'sequences',
    ]);
    $this->accessControlHandler = $this->container
        ->get('entity_type.manager')
        ->getAccessControlHandler('workflow');
    // Create and discard user 1, which is special and bypasses all access
    // checking.
    $this->createUser([]);
    $this->user = $this->createUser([]);
    $this->adminUser = $this->createUser([
        'administer workflows',
    ]);
}

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