createQuietly(['url' => 'https://example.com/article']); PageCrawl::factory()->page($page)->create(); Queue::assertPushed(ProcessCrawlJob::class); } public function test_dispatched_job_carries_the_correct_page_crawl(): void { Queue::fake(); $page = Page::factory()->createQuietly(['url' => 'https://example.com/article']); $crawl = PageCrawl::factory()->page($page)->create(); Queue::assertPushed( ProcessCrawlJob::class, fn (ProcessCrawlJob $job) => $job->pageCrawl->id === $crawl->id, ); } }