コード例 #1
0
ファイル: RouterTest.php プロジェクト: NDStudios/mc
 function testCaseSensitivity()
 {
     $this->router->map('/hello', array($this, 'ok'));
     $this->request->url = '/HELLO';
     $this->router->case_sensitive = true;
     $this->check('404');
 }
コード例 #2
0
ファイル: RouterTest.php プロジェクト: alokpant/singleArrow
 function testSplatWildcard()
 {
     $this->router->map('/account/*', function ($route) {
         echo $route->splat;
     });
     $this->request->url = '/account/123/abc/xyz';
     $this->check('123/abc/xyz');
 }
コード例 #3
0
 function testSplatWildcard()
 {
     $this->router->map('/account/*', function ($route) {
         echo $route->splat;
     }, true);
     $this->request->url = '/account/456/def/xyz';
     $this->check('456/def/xyz');
 }
コード例 #4
0
ファイル: RouterTest.php プロジェクト: JiYoungP/likeapro
 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');
 }
コード例 #5
0
 function testWildcard()
 {
     $this->router->map('/account/*', array($this, 'ok'));
     $this->request->url = '/account/123/abc/xyz';
     $this->check();
 }