insert([ ['id' => 2001, 'config_key' => 'school_year', 'config_value' => '2025-2026'], ['id' => 2002, 'config_key' => 'semester', 'config_value' => 'Fall'], ]); $service = new PaymentNotificationDispatchService(); $service->notifyUser(10, 'Payment Reminder', 'Reminder body', ['in_app']); $this->assertDatabaseHas('notifications', [ 'title' => 'Payment Reminder', 'message' => 'Reminder body', 'target_group' => 'user', 'status' => 'sent', 'school_year' => '2025-2026', 'semester' => 'Fall', ]); $this->assertDatabaseHas('user_notifications', [ 'user_id' => 10, 'delivered' => 1, 'school_year' => '2025-2026', 'semester' => 'Fall', ]); } }