示例#1
0
 public function testRouteConfig()
 {
     $file = __DIR__ . '/configs/test_routes.yml';
     $array = Yaml::parse(file_get_contents($file));
     $router = Router::parseConfig($array);
     $router->match("/hello/xujiajun", 'GET');
     $url = $router->generate('hello_show', ['xujiajun']);
     $this->assertEquals($url, '/hello/xujiajun');
 }