Пример #1
0
 public function testUrlMatchesRoute()
 {
     $r = new RouterTestWrapper();
     $r->get('/', function () {
     });
     $this->assertTrue($r->url_matches_route('/', $r->routes['GET'][0]));
 }
Пример #2
0
 public function testUrlMatchesRouteUsingDeepBase()
 {
     $r = new RouterTestWrapper();
     $base = '/hello/world';
     $url = $base . '/name/bob';
     set('base', $base);
     $r->get('/name/bob', function () {
     });
     $this->assertTrue($r->url_matches_route($url, $r->routes['GET'][0]));
 }