Fix errors in the router
This commit is contained in:
@@ -6,6 +6,8 @@ class RouterTest extends \PHPUnit\Framework\TestCase
|
||||
/**
|
||||
* Data provider for matchingRouteSuccess
|
||||
*
|
||||
* Contains: route, params, $_SERVER['REQUEST_URI'], expected_params
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function routeProvider()
|
||||
@@ -13,15 +15,15 @@ class RouterTest extends \PHPUnit\Framework\TestCase
|
||||
return [
|
||||
[
|
||||
'',
|
||||
['controller' => 'home', 'action' => 'index'],
|
||||
['controller' => 'posts', 'action' => 'index'],
|
||||
'',
|
||||
['controller' => 'home', 'action' => 'index']
|
||||
['controller' => 'posts', 'action' => 'index']
|
||||
],
|
||||
[
|
||||
'{controller}/{action}',
|
||||
[],
|
||||
'posts/new',
|
||||
['controller' => 'posts', 'action' => 'new']
|
||||
'posts/entry',
|
||||
['controller' => 'posts', 'action' => 'entry']
|
||||
],
|
||||
[
|
||||
'{controller}/{action}/{id:\d+}',
|
||||
|
||||
Reference in New Issue
Block a user