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 22
22
use Config \Cache ;
23
23
use Config \Filters as FiltersConfig ;
24
24
use Config \Modules ;
25
+ use Config \Routing ;
25
26
use Tests \Support \Filters \Customfilter ;
26
27
27
28
/**
@@ -165,7 +166,7 @@ public function testRun404OverrideByClosure()
165
166
$ _SERVER ['argc ' ] = 2 ;
166
167
167
168
// Inject mock router.
168
- $ routes = new RouteCollection (Services::locator (), new Modules ());
169
+ $ routes = new RouteCollection (Services::locator (), new Modules (), new Routing () );
169
170
$ routes ->setAutoRoute (false );
170
171
$ routes ->set404Override (static function () {
171
172
echo '404 Override by Closure. ' ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
// In app/Config/Routing.php
4
- public boolean $ translateURIDashes = true ;
4
+ $ translateURIDashes = true ;
5
5
6
6
// This can be overridden in the Routes file
7
7
$ routes ->setTranslateURIDashes (true );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
// In app/Config/Routing.php
4
- public boolean $ autoRoute = false ;
4
+ $ autoRoute = false ;
5
5
6
6
// This can be overridden in the Routes file
7
7
$ routes ->setAutoRoute (false );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
// In app/Config/Routing.php
4
- public $ override404 = 'App\Errors::show404 ' ;
4
+ $ override404 = 'App\Errors::show404 ' ;
5
5
6
6
// Would execute the show404 method of the App\Errors class
7
7
$ routes ->set404Override ('App\Errors::show404 ' );
You can’t perform that action at this time.
0 commit comments