From 4e1cfea68ea088c2b766a7dec899e8b698ec0e9c Mon Sep 17 00:00:00 2001 From: Emmanuel ROY Date: Fri, 1 Mar 2024 20:43:46 +0100 Subject: [PATCH] Update EdgeAltoRouterTest.php --- tests/EdgeAltoRouterTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/EdgeAltoRouterTest.php b/tests/EdgeAltoRouterTest.php index 4d320a9..65c95a4 100644 --- a/tests/EdgeAltoRouterTest.php +++ b/tests/EdgeAltoRouterTest.php @@ -601,17 +601,24 @@ public function testSetRouteFromConfig() ; $this->assertEquals([$method, $route, $target, ''], $routes[1]); - /*$this->assertEquals([ + $this->assertEquals([ 'target' => 'home#index', 'params' => [], 'name' => 'home' - ], $this->router->match('/home#index', 'GET'));*/ + ], $this->router->match('/', 'GET')); - /*$this->assertEquals([ + $this->assertEquals([ 'target' => 'home#index', 'params' => [], 'name' => 'home' - ], $this->router->match('/home#index', 'POST'));*/ + ], $this->router->match('/', 'POST')); + + $this->assertEquals([ + 'target' => ['c' => 'UserController','a' => 'ListAction'], + 'params' => [], + 'name' => '' + ], $this->router->match('/users/', 'GET')); + $this->assertEquals([ 'target' => 'users#show',