You are here

protected function WorkspacePointerTest::createWorkspace in Workspace 8

Creates a workspace for testing purposes.

Return value

WorkspaceInterface

2 calls to WorkspacePointerTest::createWorkspace()
WorkspacePointerTest::testCreationWithId in tests/src/Kernel/WorkspacePointerTest.php
Verifies pointers can be created using an ID as the reference.
WorkspacePointerTest::testCreationWithObject in tests/src/Kernel/WorkspacePointerTest.php
Verifies pointers can be created using an object as the reference.

File

tests/src/Kernel/WorkspacePointerTest.php, line 56

Class

WorkspacePointerTest
Tests for the WorkspacePointer entity.

Namespace

Drupal\Tests\workspace\Kernel

Code

protected function createWorkspace() {
  $workspace = Workspace::create([
    'type' => 'test',
    'machine_name' => 'le_workspace',
    'label' => 'Le Workspace',
  ]);
  $workspace
    ->save();
  return $workspace;
}