function WorkspacesMediaLibraryIntegrationTest::setUp

File

core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesMediaLibraryIntegrationTest.php, line 41

Class

WorkspacesMediaLibraryIntegrationTest
Tests the Media library entity reference widget in a workspace.

Namespace

Drupal\Tests\workspaces\FunctionalJavascript

Code

public function setUp() : void {
    if (in_array($this->name(), static::SKIP_METHODS, TRUE)) {
        $this->markTestSkipped('Irrelevant for this test');
    }
    parent::setUp();
    // Ensure that all the test methods are executed in the context of a
    // workspace.
    $stage = Workspace::load('stage');
    \Drupal::service('workspaces.manager')->setActiveWorkspace($stage);
}

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