Skip to content

Commit

Permalink
Cast response body to a string for the entire response body.
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jan 8, 2024
1 parent b427321 commit c2f1184
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/MezzioInstallerTest/HomePageResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function testHomePageHtmlResponseContainsExpectedInfo(
self::assertEquals(200, $response->getStatusCode());

// Test response content
$html = $response->getBody()->getContents();
$html = $response->getBody()->__toString();

self::assertStringContainsString(sprintf('Get started with %s', $containerName), $html);
self::assertStringContainsString(sprintf('href="%s"', $containerDocs), $html);
Expand Down Expand Up @@ -263,7 +263,7 @@ public function testHomePageJsonResponseContainsExpectedInfo(
self::assertEquals(200, $response->getStatusCode());

// Test response content
$json = $response->getBody()->getContents();
$json = $response->getBody()->__toString();
$data = json_decode($json, true, 512, JSON_THROW_ON_ERROR);

self::assertIsArray($data);
Expand Down

0 comments on commit c2f1184

Please sign in to comment.