Skip to content

Commit b942f7f

Browse files
committed
Simplify exception handler reset in test teardown
1 parent 2ad3660 commit b942f7f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/TestCase.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,9 @@ protected function setUp(): void
2727

2828
protected function tearDown(): void
2929
{
30-
if (
31-
method_exists(\Illuminate\Foundation\Bootstrap\HandleExceptions::class, 'flushHandlersState') &&
32-
$this->app
33-
) {
34-
try {
35-
\Illuminate\Foundation\Bootstrap\HandleExceptions::flushHandlersState($this);
36-
} catch (\Throwable $e) {
37-
}
38-
}
39-
4030
parent::tearDown();
31+
32+
restore_exception_handler();
4133
}
4234

4335
protected function getPackageProviders($app)

0 commit comments

Comments
 (0)