Skip to content

Commit e9a8fca

Browse files
committed
Updating doc code samples and CodeIgniter test
1 parent f647cc1 commit e9a8fca

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

tests/system/CodeIgniterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Config\Cache;
2323
use Config\Filters as FiltersConfig;
2424
use Config\Modules;
25+
use Config\Routing;
2526
use 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.';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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);

user_guide_src/source/incoming/routing/051.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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');

0 commit comments

Comments
 (0)