You are here

protected function WorkflowAccessControlHandlerTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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 \Drupal\workflows\WorkflowAccessControlHandler @group workflows

Namespace

Drupal\Tests\workflows\Kernel

Code

protected function setUp() : void {
  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',
  ]);
}