$this->
assertEquals($request->
getUri(),
$finalRequest->
getUri());
$this->
assertEquals($request->
getUser(),
$finalRequest->
getUser());
$this->
assertEquals($request->
getUserInfo(),
$finalRequest->
getUserInfo());
} elseif ($finalRequest instanceof ServerRequestInterface
) { $strToLower =
function D
$arr) { foreach ($arr as $key =>
$value) { yield strtolower($key) =>
$value;
} };
$this->
assertEquals($request->
getAttributes(),
$finalRequest->
getAttributes());
$this->
assertEquals($request->
getCookieParams(),
$finalRequest->
getCookieParams());
$this->
assertEquals((array) $request->
getParsedBody(),
(array) $finalRequest->
getParsedBody());
$this->
assertEquals($request->
getQueryParams(),
$finalRequest->
getQueryParams());
// PSR7 does not define a "withServerParams" so this is impossible to implement without knowing the PSR7 implementation.
// $this->assertEquals($request->getServerParams(), $finalRequest->getServerParams());
$this->
assertEquals($request->
getUploadedFiles(),
$finalRequest->
getUploadedFiles());
$this->
assertEquals($request->
getMethod(),
$finalRequest->
getMethod());
$this->
assertEquals($request->
getRequestTarget(),
$finalRequest->
getRequestTarget());
$this->
assertEquals((string) $request->
getUri(),
(string) $finalRequest->
getUri());
$this->
assertEquals((string) $request->
getBody(),
(string) $finalRequest->
getBody());
$this->
assertEquals($strToLower($request->
getHeaders()),
$strToLower($finalRequest->
getHeaders()));
$this->
assertEquals($request->
getProtocolVersion(),
$finalRequest->
getProtocolVersion());
} else {