Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
27pchrisl committed Mar 21, 2024
1 parent aa9c37b commit eeb7fbb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Protocol/ErrorReportingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@ public function test_get_original_exception()
} else {
$this->assertInstanceOf(ErrorException::class, $innerException);
}
}

public function test_report_inner_exception()
{
if (version_compare(app()->version(), '9', '<')) {
$this->markTestSkipped();
}

$func = new Function_('divzero');
$func->setCallable(function () {
/** @noinspection PhpDivisionByZeroInspection */
$a = 4 / 0;
});
Lodata::add($func);

$testResponse = $this->assertInternalServerError(
(new Request)
->path('/divzero()')
);

$innerException = $testResponse->exception->getOriginalException();

$spy = Log::spy();
$handler = app(Handler::class);
Expand Down

0 comments on commit eeb7fbb

Please sign in to comment.