You are here

protected function WorkspaceTestUtilities::getOneWorkspaceByLabel in Workspace 8

Loads a single workspace by its label.

The UI approach to creating a workspace doesn't make it easy to know what the ID is, so this lets us make paths for a workspace after it's created.

Parameters

$label: The label of the workspace to load.

Return value

\Drupal\multiversion\Entity\WorkspaceInterface

9 calls to WorkspaceTestUtilities::getOneWorkspaceByLabel()
ReplicationSettingsTest::testPullReplicationSettings in tests/src/Functional/ReplicationSettingsTest.php
Verify pull replication settings using the published filter as an example.
ReplicationSettingsTest::testPushReplicationSettings in tests/src/Functional/ReplicationSettingsTest.php
Verify push replication settings using the published filter as an example.
WorkspaceIndividualPermissionsTest::testEditIndividualWorkspace in tests/src/Functional/WorkspaceIndividualPermissionsTest.php
Verifies that a user can create and edit only their own workspace.
WorkspaceIndividualPermissionsTest::testViewIndividualWorkspace in tests/src/Functional/WorkspaceIndividualPermissionsTest.php
Verifies that a user can view a specific workspace.
WorkspacePermissionsTest::testEditAnyWorkspace in tests/src/Functional/WorkspacePermissionsTest.php
Verifies that a user can edit any workspace.

... See full list

File

tests/src/Functional/WorkspaceTestUtilities.php, line 27

Class

WorkspaceTestUtilities
Utility methods for use in BrowserTestBase tests.

Namespace

Drupal\Tests\workspace\Functional

Code

protected function getOneWorkspaceByLabel($label) {
  return $this
    ->getOneEntityByLabel('workspace', $label);
}