File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public function setUp()
27
27
'books/(:num)/(:alpha)/(:num) ' => 'Blog::show/$3/$1 ' ,
28
28
'closure/(:num)/(:alpha) ' => function ($ num , $ str ) { return $ num .'- ' .$ str ; },
29
29
'{locale}/pages ' => 'App\Pages::list_all ' ,
30
+ 'Admin/Admins ' => 'App\Admin\Admins::list_all ' ,
30
31
];
31
32
32
33
$ this ->collection ->map ($ routes );
@@ -192,4 +193,16 @@ public function testDetectsLocales()
192
193
193
194
//--------------------------------------------------------------------
194
195
196
+ public function testRouteResource ()
197
+ {
198
+ $ router = new Router ($ this ->collection );
199
+
200
+ $ router ->handle ('Admin/Admins ' );
201
+
202
+ $ this ->assertEquals ('\App\Admin\Admins ' , $ router ->controllerName ());
203
+ $ this ->assertEquals ('list_all ' , $ router ->methodName ());
204
+ }
205
+
206
+ //--------------------------------------------------------------------
207
+
195
208
}
You can’t perform that action at this time.
0 commit comments