public function testRouteMatchesResourceWithUnreservedMarks() { $marks = "-_.!~*'()"; $resource = 'marks/' . $marks; $route = new Route('/marks/:marks', function () { }); $result = $route->matches($resource); $this->assertTrue($result); $this->assertEquals($route->params(), array('marks' => $marks)); }
/** * Route does not match URI with conditions */ public function testRouteDoesNotMatchResourceWithConditions() { $resource = 'hello/Josh/and/John'; $route = new Route('/hello/:first/and/:second', function () { }); $route->conditions(array('first' => '[a-z]{3,}')); $result = $route->matches($resource); $this->assertFalse($result); $this->assertEquals($route->params(), array()); }
/** * @param string $params * * @access public * * @uses $params * * @return void */ public static function unset_params() { self::$params = false; return; }
function params($key) { return Route::params($key); }