Skip to content

Commit

Permalink
reland reverted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Sep 26, 2023
1 parent 949c930 commit e4a135f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/DemosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected function setSuperglobalsFromRequest(RequestInterface $request): void
'QUERY_STRING' => $requestQuery,
'DOCUMENT_ROOT' => $rootDirRealpath,
'SCRIPT_FILENAME' => $rootDirRealpath . $requestPath,
'CONTENT_TYPE' => $request->getHeaderLine('Content-Type'),
];

$_GET = [];
Expand Down Expand Up @@ -488,7 +489,12 @@ public function provideDemoAssertJsonResponsePostCases(): iterable
*/
public function testDemoAssertJsonResponsePost(string $path, array $postData): void
{
$response = $this->getResponseFromRequest($path, ['form_params' => $postData]);
$response = $this->getResponseFromRequest($path, [
'headers' => [
'Content-Type' => 'application/x-www-form-urlencoded',
],
'form_params' => $postData,
]);
self::assertSame(200, $response->getStatusCode());
self::assertMatchesRegularExpression($this->regexJson, $response->getBody()->getContents());
}
Expand Down

0 comments on commit e4a135f

Please sign in to comment.