function WorkspaceRequestSubscriberTest::setUp
Same name in other branches
- 8.9.x core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::setUp()
- 10 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 40
Class
- WorkspaceRequestSubscriberTest
- @coversDefaultClass \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber
Namespace
Drupal\Tests\workspaces\UnitCode
protected function setUp() : void {
parent::setUp();
$this->aliasManager = $this->prophesize(AliasManagerInterface::class)
->reveal();
$this->currentPath = $this->prophesize(CurrentPathStack::class)
->reveal();
$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.