You are here

protected function WorkspaceCRUDTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php \Drupal\Tests\workspaces\Kernel\WorkspaceCRUDTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php, line 62

Class

WorkspaceCRUDTest
Tests CRUD operations for workspaces.

Namespace

Drupal\Tests\workspaces\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->setUpCurrentUser();
  $this
    ->installSchema('system', [
    'key_value_expire',
  ]);
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installEntitySchema('workspace');
  $this
    ->installSchema('workspaces', [
    'workspace_association',
  ]);
  $this
    ->installEntitySchema('node');
  $this
    ->installConfig([
    'filter',
    'node',
    'system',
  ]);
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $this->entityTypeManager = \Drupal::entityTypeManager();
  $this->state = \Drupal::state();
  $this->workspaceManager = \Drupal::service('workspaces.manager');
}