You are here

protected function RequestDomainTest::setUp in Context 8.4

Overrides KernelTestBase::setUp

File

tests/src/Kernel/RequestDomainTest.php, line 49

Class

RequestDomainTest
Tests the request domain condition plugin.

Namespace

Drupal\Tests\context\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->pluginManager = $this->container
    ->get('plugin.manager.condition');

  // Set the test request stack in the container.
  $this->requestStack = new RequestStack();
  $this->container
    ->set('request_stack', $this->requestStack);
  $this->currentPath = new CurrentPathStack($this->requestStack);
  $this->container
    ->set('path.current', $this->currentPath);
  $this->container
    ->set('current_route_match', new CurrentRouteMatch($this->requestStack));
}