<?php
require_once 'vendor/autoload.php';

use App\Framework\Http\HttpRequest;
use App\Framework\Http\Request;
use App\Framework\DI\DefaultContainer;

echo "Testing DI Container Request binding..." . PHP_EOL;

try {
    // Test simple DI binding
    $container = new DefaultContainer();
    
    // Manual binding (this should work)
    $container->bind(Request::class, HttpRequest::class);
    echo "Binding created successfully" . PHP_EOL;
    
    // Test resolution
    $request = $container->get(Request::class);
    echo "Request resolved: " . get_class($request) . PHP_EOL;
    echo "Implements Request interface: " . (($request instanceof Request) ? "YES" : "NO") . PHP_EOL;
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . PHP_EOL;
    echo "Trace: " . $e->getTraceAsString() . PHP_EOL;
}