function NegotiationMiddlewareTest::setUp

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::setUp()
  3. 9 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::setUp()
  4. 8.9.x core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php, line 36

Class

NegotiationMiddlewareTest
Tests Drupal\Core\StackMiddleware\NegotiationMiddleware.

Namespace

Drupal\Tests\Core\StackMiddleware

Code

protected function setUp() : void {
  parent::setUp();
  $this->httpKernel = $this->prophesize(HttpKernelInterface::class);
  $this->contentNegotiation = new StubNegotiationMiddleware($this->httpKernel
    ->reveal());
}

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