Exemple #1
0
 function testCaseSensitivity()
 {
     $this->router->map('/hello', array($this, 'ok'));
     $this->request->url = '/HELLO';
     $this->router->case_sensitive = true;
     $this->check('404');
 }
Exemple #2
0
 function testSplatWildcard()
 {
     $this->router->map('/account/*', function ($route) {
         echo $route->splat;
     });
     $this->request->url = '/account/123/abc/xyz';
     $this->check('123/abc/xyz');
 }
 function testSplatWildcard()
 {
     $this->router->map('/account/*', function ($route) {
         echo $route->splat;
     }, true);
     $this->request->url = '/account/456/def/xyz';
     $this->check('456/def/xyz');
 }
Exemple #4
0
 function testSplatNamedPlusWildcard()
 {
     $this->router->map('/account/@name/*', function ($name, $route) {
         echo $route->splat;
         $this->assertEquals('abc', $name);
     }, true);
     $this->request->url = '/account/abc/456/def/xyz';
     $this->check('456/def/xyz');
 }
 function testWildcard()
 {
     $this->router->map('/account/*', array($this, 'ok'));
     $this->request->url = '/account/123/abc/xyz';
     $this->check();
 }