<?php
require_once __DIR__ . '/config/database.php';
function sendError($msg, $code) { echo "Error: $msg ($code)\n"; }
function sendSuccess($data, $msg = '', $code = 200) { echo "Success: " . json_encode($data) . "\n"; }

class AuthController {
    public static function requireAuth() {
        return ['id' => 1]; // Mock user ID 1
    }
}

require_once __DIR__ . '/controllers/AddressController.php';

echo "Testing AddressController::getAddresses()...\n";
try {
    AddressController::getAddresses();
} catch (Exception $e) {
    echo "Caught exception: " . $e->getMessage() . "\n";
}
