function testCaseSensitivity() { $this->router->map('/hello', array($this, 'ok')); $this->request->url = '/HELLO'; $this->router->case_sensitive = true; $this->check('404'); }
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'); }
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(); }