private function assertNoMissingHeaders(RequestInterface $request, ResponseInterface $response)
{
$method = $request->getMethod();
$path = $request->getUri()->getPath();
$statusCode = $response->getStatusCode();
$schemaHeaders = $this->schemaHelper->getResponseHeaders($method, $path, $statusCode, true);
$missingHeaders = array_diff_key($schemaHeaders, $response->getHeaders());
if (count($missingHeaders) === 0) {
return;
}
throw new ValidatorResponseException(sprintf('Missing response headers required by the schema for %s %s with status code %s: %s', strtoupper($method), $path, $statusCode, $this->getNamedParametersAsString($missingHeaders)));
}