Merge pull request #207 from skipperbent/v2-development

Development
This commit is contained in:
Simon Sessingø
2017-01-19 18:41:43 +01:00
committed by GitHub
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -402,7 +402,7 @@ abstract class Route implements IRoute
*/
public function where(array $options)
{
return $this->where($options);
return $this->setWhere($options);
}
/**
+12
View File
@@ -99,4 +99,16 @@ class RouterUrlTest extends PHPUnit_Framework_TestCase
}
public function testRegEx()
{
SimpleRouter::router()->reset();
SimpleRouter::request()->setMethod('get');
SimpleRouter::request()->setUri('/my/custom-path');
SimpleRouter::get('/my/{path}', 'DummyController@start')->where(['path' => '[a-zA-Z\-]+']);
SimpleRouter::start();
}
}