<?php

require_once __DIR__ . '/config/config.php'; 
require_once __DIR__ . '/config/database.php';
require_once __DIR__ . '/middleware/auth.php';

echo "Testing authentication...\n";

try {
    $company = authenticateCompany();
    echo "✅ Authentication successful!\n";
    echo "Company ID: " . $company['id'] . "\n";
    echo "Company Name: " . $company['name'] . "\n";
} catch (Exception $e) {
    echo "❌ Error: " . $e->getMessage() . "\n";
}