public function match($params) { $matches = parent::match($params); if (is_array($matches)) { $this->matches = $matches; } return $matches; }
public function testGetMatchedParamReturnsDefaultValueIfParameterIsNotMatched() { $route = new Route('foo', 'foo [<bar>]'); $matches = $route->match(['foo']); $this->assertNull($route->getMatchedParam('bar')); }