Skip to content

Commit

Permalink
Merge pull request #65 from gam6itko/assert_status_body
Browse files Browse the repository at this point in the history
TestResponse::assertStatus display response body on assert fail
  • Loading branch information
butschster authored Oct 26, 2023
2 parents 59e5600 + c84ec81 commit d265fde
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 d265fde

Please sign in to comment.