You are here

protected function DefaultWorkspaceNegotiatorTest::setUp in Multiversion 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/DefaultWorkspaceNegotiatorTest.php, line 33

Class

DefaultWorkspaceNegotiatorTest
@coversDefaultClass \Drupal\multiversion\Workspace\DefaultWorkspaceNegotiator @group multiversion

Namespace

Drupal\Tests\multiversion\Unit

Code

protected function setUp() {
  parent::setUp();
  $container = new ContainerBuilder();
  $container
    ->setParameter('workspace.default', 1);
  \Drupal::setContainer($container);
  $this->workspaceNegotiator = new DefaultWorkspaceNegotiator();
  $this->workspaceNegotiator
    ->setContainer($container);
  $this->request = Request::create('<front>');
}