Skip to content

Commit

Permalink
TestResponse::assertStatus display response body on assert fail
Browse files Browse the repository at this point in the history
  • Loading branch information
gam6itko committed Oct 26, 2023
1 parent 59e5600 commit c84ec81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Http/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ public function assertStatus(int $status): self
$this->response->getStatusCode(),
$status,
\sprintf(
"Received response status code [%s : %s] but expected %s.",
"Received response status code [%s : %s] but expected %s. Body: %s",
$this->response->getStatusCode(),
$this->response->getReasonPhrase(),
$status
$status,
(string) $this->response->getBody(),
)
);

Expand Down

0 comments on commit c84ec81

Please sign in to comment.