Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Fixed failing test
Browse files Browse the repository at this point in the history
Patch #39 added the method `testInvokingWithExceptionInNonProductionModeIncludesPrevTraceInResponseBody`.
The test fails after adding the code from #46, as that code modifies
`FinalHandler` to never provide exception details unless in
non-production mode (which is the default). This patch updates the test
to set the final handler used in the test setup to set the environment
to development so that the expectations pass.
  • Loading branch information
weierophinney committed Mar 17, 2016
1 parent 43959d0 commit 823b89f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/FinalHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public function testInvokingWithExceptionInNonProductionModeIncludesPrevTraceInR
{
$prev = new \Exception('boobar', 500);
$error = new Exception('foo', 400, $prev);
$response = call_user_func($this->final, $this->request, $this->response, $error);
$final = new FinalHandler(['env' => 'development'], $this->response);
$response = call_user_func($final, $this->request, $this->response, $error);
$expected = $this->escaper->escapeHtml($error->getTraceAsString());
$body = (string) $response->getBody();
$this->assertContains($expected, $body);
Expand Down

0 comments on commit 823b89f

Please sign in to comment.