Skip to content

Commit

Permalink
Debug github CI problem
Browse files Browse the repository at this point in the history
  • Loading branch information
otsch committed Aug 3, 2024
1 parent a917ab7 commit 823e2b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Stubs/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ class ErrorHandler extends AbstractTestErrorHandler
{
public function boot(): void
{
file_put_contents(
__DIR__ . '/../_testdata/datapath/error-handler-events',
'error reporting: ' . error_reporting(),
FILE_APPEND,
);

$this->registerHandler(function (Throwable $exception) {
$this->logErrorEvent($exception);
});
Expand Down
4 changes: 4 additions & 0 deletions tests/_integration/ErrorHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
});

it('handles a PHP warning', function () {
error_reporting(E_ALL);

$job = Dispatcher::queue('default')
->job(PhpWarningJob::class)
->dispatch();
Expand All @@ -68,6 +70,8 @@
$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);

expect($job?->status)->toBe(QueueJobStatus::finished)
->and($handlerEvents)->toContain('PHP Warning: unserialize(): Error at offset 0 of 3 bytes');
Expand Down

0 comments on commit 823e2b6

Please sign in to comment.