diff --git a/tests/_integration/ErrorHandlerTest.php b/tests/_integration/ErrorHandlerTest.php index 2314791..3e0a293 100644 --- a/tests/_integration/ErrorHandlerTest.php +++ b/tests/_integration/ErrorHandlerTest.php @@ -5,6 +5,7 @@ use Otsch\Ppq\Config; use Otsch\Ppq\Dispatcher; use Otsch\Ppq\Entities\Values\QueueJobStatus; +use Otsch\Ppq\Logs; use Otsch\Ppq\Ppq; use Otsch\Ppq\Utils; use Stubs\ExceptionJob; @@ -55,8 +56,6 @@ }); it('handles a PHP warning', function () { - error_reporting(E_ALL); - $job = Dispatcher::queue('default') ->job(PhpWarningJob::class) ->dispatch(); @@ -69,10 +68,10 @@ $handlerEvents = file_get_contents(helper_testDataPath('error-handler-events')); - helper_dump(file_exists(helper_testDataPath('error-handler-events'))); - helper_dump(error_reporting()); helper_dump($handlerEvents); + helper_dump(Logs::getJobLog($job)); // @phpstan-ignore-line + expect($job?->status)->toBe(QueueJobStatus::finished) ->and($handlerEvents)->toContain('PHP Warning: unserialize(): Error at offset 0 of 3 bytes'); })->only();