@@ -39,6 +39,7 @@ protected function setUp(): void
3939 $ this ->collection = new RouteCollection (Services::locator (), $ moduleConfig );
4040
4141 $ routes = [
42+ '/ ' => 'Home::index ' ,
4243 'users ' => 'Users::index ' ,
4344 'user-setting/show-list ' => 'User_setting::show_list ' ,
4445 'user-setting/(:segment) ' => 'User_setting::detail/$1 ' ,
@@ -56,20 +57,20 @@ protected function setUp(): void
5657 'objects/(:segment)/sort/(:segment)/([A-Z]{3,7}) ' => 'AdminList::objectsSortCreate/$1/$2/$3 ' ,
5758 '(:segment)/(:segment)/(:segment) ' => '$2::$3/$1 ' ,
5859 ];
59-
6060 $ this ->collection ->map ($ routes );
61+
6162 $ this ->request = Services::request ();
6263 $ this ->request ->setMethod ('get ' );
6364 }
6465
65- public function testEmptyURIMatchesDefaults ()
66+ public function testEmptyURIMatchesRoot ()
6667 {
6768 $ router = new Router ($ this ->collection , $ this ->request );
6869
6970 $ router ->handle ('' );
7071
71- $ this ->assertSame ($ this -> collection -> getDefaultController () , $ router ->controllerName ());
72- $ this ->assertSame ($ this -> collection -> getDefaultMethod () , $ router ->methodName ());
72+ $ this ->assertSame (' \Home ' , $ router ->controllerName ());
73+ $ this ->assertSame (' index ' , $ router ->methodName ());
7374 }
7475
7576 public function testZeroAsURIPath ()
0 commit comments