diff --git a/queues.md b/queues.md index f15c69c8ca6..d311d00ecba 100644 --- a/queues.md +++ b/queues.md @@ -50,6 +50,7 @@ - [Monitoring Your Queues](#monitoring-your-queues) - [Testing](#testing) - [Faking a Subset of Jobs](#faking-a-subset-of-jobs) + - [Scoped Queue Fakes](#scoped-queue-fakes) - [Testing Job Chains](#testing-job-chains) - [Testing Job Batches](#testing-job-batches) - [Testing Job / Queue Interactions](#testing-job-queue-interactions) @@ -2584,6 +2585,120 @@ Queue::fake()->except([ ]); ``` + +### Scoped Queue Fakes + +If you only want to fake queued jobs for a portion of your test, you may use the `fakeFor` method: + +```php tab=Pest + ### Testing Job Chains