function WorkspaceTestTrait::switchToLive

Same name in other branches
  1. 10 core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php \Drupal\Tests\workspaces\Kernel\WorkspaceTestTrait::switchToLive()

Switches the test runner's context to Live.

2 calls to WorkspaceTestTrait::switchToLive()
EntityWorkspaceConflictConstraintValidatorTest::testNewEntitiesAllowedInDefaultWorkspace in core/modules/workspaces/tests/src/Kernel/EntityWorkspaceConflictConstraintValidatorTest.php
@covers ::validate
WorkspaceContentTranslationTest::testTranslations in core/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php
Tests translations created in a workspace.

File

core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php, line 79

Class

WorkspaceTestTrait
A trait with common workspaces testing functionality.

Namespace

Drupal\Tests\workspaces\Kernel

Code

protected function switchToLive() : void {
    \Drupal::service('workspaces.manager')->switchToLive();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.