Skip to content

Commit d265fde

Browse files
authored
Merge pull request #65 from gam6itko/assert_status_body
TestResponse::assertStatus display response body on assert fail
2 parents 59e5600 + c84ec81 commit d265fde

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Http/TestResponse.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ public function assertStatus(int $status): self
6161
$this->response->getStatusCode(),
6262
$status,
6363
\sprintf(
64-
"Received response status code [%s : %s] but expected %s.",
64+
"Received response status code [%s : %s] but expected %s. Body: %s",
6565
$this->response->getStatusCode(),
6666
$this->response->getReasonPhrase(),
67-
$status
67+
$status,
68+
(string) $this->response->getBody(),
6869
)
6970
);
7071

0 commit comments

Comments
 (0)