dispatch([], '2025-2026', 'Fall'); $this->assertTrue($result['ok']); $this->assertSame(0, $result['triggered']); Event::assertNotDispatched(WhatsappInvitesSend::class); } public function test_dispatch_triggers_event_when_bundle_provided(): void { $bundle = [[ 'parent' => ['id' => 10], 'emails' => ['parent1@example.com'], 'sections' => [], 'links' => ['https://chat.whatsapp.com/abc'], ]]; $service = new WhatsappInviteNotificationService; $result = $service->dispatch($bundle, '2025-2026', 'Fall'); $this->assertTrue($result['ok']); $this->assertSame(1, $result['triggered']); Event::assertDispatched(WhatsappInvitesSend::class, 1); } }