File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
user_guide_src/source/incoming/routing Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2222use Config \Cache ;
2323use Config \Filters as FiltersConfig ;
2424use Config \Modules ;
25+ use Config \Routing ;
2526use Tests \Support \Filters \Customfilter ;
2627
2728/**
@@ -165,7 +166,7 @@ public function testRun404OverrideByClosure()
165166 $ _SERVER ['argc ' ] = 2 ;
166167
167168 // Inject mock router.
168- $ routes = new RouteCollection (Services::locator (), new Modules ());
169+ $ routes = new RouteCollection (Services::locator (), new Modules (), new Routing () );
169170 $ routes ->setAutoRoute (false );
170171 $ routes ->set404Override (static function () {
171172 echo '404 Override by Closure. ' ;
Original file line number Diff line number Diff line change 11<?php
22
33// In app/Config/Routing.php
4- public boolean $ translateURIDashes = true ;
4+ $ translateURIDashes = true ;
55
66// This can be overridden in the Routes file
77$ routes ->setTranslateURIDashes (true );
Original file line number Diff line number Diff line change 11<?php
22
33// In app/Config/Routing.php
4- public boolean $ autoRoute = false ;
4+ $ autoRoute = false ;
55
66// This can be overridden in the Routes file
77$ routes ->setAutoRoute (false );
Original file line number Diff line number Diff line change 11<?php
22
33// In app/Config/Routing.php
4- public $ override404 = 'App\Errors::show404 ' ;
4+ $ override404 = 'App\Errors::show404 ' ;
55
66// Would execute the show404 method of the App\Errors class
77$ routes ->set404Override ('App\Errors::show404 ' );
You can’t perform that action at this time.
0 commit comments