You are here

protected function WorkspacePointerTest::createWorkspaceType in Workspace 8

Creates a workspace type for testing purposes.

Return value

WorkspaceType

2 calls to WorkspacePointerTest::createWorkspaceType()
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 41

Class

WorkspacePointerTest
Tests for the WorkspacePointer entity.

Namespace

Drupal\Tests\workspace\Kernel

Code

protected function createWorkspaceType() {
  $workspace_type = WorkspaceType::create([
    'id' => 'test',
    'label' => 'Workspace bundle',
  ]);
  $workspace_type
    ->save();
  return $workspace_type;
}