Skip to content

[10.x] Allow older jobs to be faked - #48434

Merged
taylorotwell merged 1 commit into
laravel:10.xfrom
timacdonald:fake-pushed-jobs
Sep 18, 2023
Merged

taylorotwell merged 1 commit into
laravel:10.xfrom
timacdonald:fake-pushed-jobs

Conversation

@timacdonald

@timacdonald timacdonald commented Sep 18, 2023 •

Copy link
Copy Markdown
Member

Older style queued job pushing, where you are referencing the job class and passing the payload as an array, is not currently supported. This fixes that.

Queue::fake([MyJob::class]);

Queue::push(MyJob::class, ['job' => 'payload']);

Queue::assertPushed(MyJob::class);

@taylorotwell
taylorotwell merged commit d95209b into laravel:10.x Sep 18, 2023
@timacdonald
timacdonald deleted the fake-pushed-jobs branch September 18, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants