function ResponseStatusTest::setUp

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php \Drupal\KernelTests\Core\Plugin\Condition\ResponseStatusTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php, line 41

Class

ResponseStatusTest
Tests the Response Status Condition, provided by the system module.

Namespace

Drupal\KernelTests\Core\Plugin\Condition

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig('system');
    $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);
}

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