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