function test($name, $route, $method, $action) { $res = Router::dispatch($route, $method); if ($action == $res['action']) { echo "Test '{$name}' [{$method} {$route}] passed\n"; } else { echo "Test '{$name}' [{$method} {$route}] NOT passed\n"; } }
public static function register(array $routes, array $tokens = null) { Router::register(static::factory(), $routes, $tokens); }