function WorkspaceRequestSubscriberTest::setUp
Same name in other branches
- 9 core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::setUp()
- 8.9.x core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::setUp()
- 11.x core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ workspaces/ tests/ src/ Unit/ WorkspaceRequestSubscriberTest.php, line 30
Class
- WorkspaceRequestSubscriberTest
- @coversDefaultClass \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber
Namespace
Drupal\Tests\workspaces\UnitCode
protected function setUp() : void {
parent::setUp();
$this->workspaceManager = $this->prophesize(WorkspaceManagerInterface::class);
$active_workspace = $this->prophesize(WorkspaceInterface::class);
$active_workspace->id()
->willReturn('test');
$this->workspaceManager
->getActiveWorkspace()
->willReturn($active_workspace->reveal());
$this->workspaceManager
->hasActiveWorkspace()
->willReturn(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.