- Define Route and RouteDefinition classes with SRP focus - Implement Router class with Inversion of Control (DI for config) - Create Config object for handling modules_path, routes_file, and modules_glob - Implement MissingConfigurationException - Setup basic PHPUnit suite with comprehensive tests All tests passing: 11 tests, 24 assertions Closes milestone 1 from MILESTONES.md
11 lines
284 B
PHP
11 lines
284 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
$router = new Atlas\Router(new Atlas\Config(['modules_path' => ['/tmp']]));
|
|
|
|
$router->get('/users', 'Handler', 'user_list');
|
|
|
|
echo "Generated URL: " . $router->url('user_list') . "\n";
|
|
echo "Expected URL: /users\n"; |