You are here

public function MockHttpClientMiddleware::__construct in Thunder 8.5

Same name and namespace in other branches
  1. 6.2.x tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php \Drupal\thunder_test_mock_request\MockHttpClientMiddleware::__construct()
  2. 6.1.x tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php \Drupal\thunder_test_mock_request\MockHttpClientMiddleware::__construct()

MockHttpClientMiddleware constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The current request stack.

\Drupal\Core\State\StateInterface $state: The state service.

File

tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php, line 38

Class

MockHttpClientMiddleware
Sets the mocked responses.

Namespace

Drupal\thunder_test_mock_request

Code

public function __construct(RequestStack $requestStack, StateInterface $state) {
  $this->request = $requestStack
    ->getCurrentRequest();
  $this->state = $state;
}