'REQUEST_URI' => '/testCreateRequest?bar[baz]=42&foo=1',
'QUERY_STRING' => 'bar[baz]=42&foo=1',
],
'Content'
);
$request->headers->
set(' X-Broken', 'abc'
);
$psrRequest =
$factory->
createRequest($request);
$this->
assertSame('Content',
$psrRequest->
getBody()->
__toString());
$queryParams =
$psrRequest->
getQueryParams();
$this->
assertSame('1',
$queryParams['foo'
]);
$this->
assertSame('42',
$queryParams['bar'
]['baz'
]);
$requestTarget =
$psrRequest->
getRequestTarget();
$this->
assertSame('/testCreateRequest?bar[baz]=42&foo=1',
urldecode($requestTarget));
$parsedBody =
$psrRequest->
getParsedBody();
$this->
assertSame('Kévin Dunglas',
$parsedBody['twitter'
]['@dunglas'
]);
$this->
assertSame('Les-Tilleuls.coop',
$parsedBody['twitter'
]['@coopTilleuls'
]);
$this->
assertSame('2',
$parsedBody['baz'
]);