File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ final class RoutesTest extends CIUnitTestCase
2626
2727 protected function setUp (): void
2828 {
29+ $ this ->resetServices ();
30+
2931 parent ::setUp ();
3032
3133 CITestStreamFilter::$ buffer = '' ;
@@ -40,6 +42,8 @@ protected function setUp(): void
4042 protected function tearDown (): void
4143 {
4244 stream_filter_remove ($ this ->streamFilter );
45+
46+ $ this ->resetServices ();
4347 }
4448
4549 protected function getBuffer ()
@@ -60,6 +64,7 @@ public function testRoutesCommand()
6064 public function testRoutesCommandRouteFilterAndAutoRoute ()
6165 {
6266 $ routes = Services::routes ();
67+ $ routes ->setDefaultNamespace ('App\Controllers ' );
6368 $ routes ->resetRoutes ();
6469 $ routes ->get ('/ ' , 'Home::index ' , ['filter ' => 'csrf ' ]);
6570
Original file line number Diff line number Diff line change 1313
1414use CodeIgniter \Test \CIUnitTestCase ;
1515use CodeIgniter \Test \Filters \CITestStreamFilter ;
16+ use Config \Autoload ;
17+ use Config \Modules ;
18+ use Config \Services ;
1619
1720/**
1821 * @internal
@@ -23,6 +26,9 @@ final class ScaffoldGeneratorTest extends CIUnitTestCase
2326
2427 protected function setUp (): void
2528 {
29+ $ this ->resetServices ();
30+ Services::autoloader ()->initialize (new Autoload (), new Modules ());
31+
2632 CITestStreamFilter::$ buffer = '' ;
2733
2834 $ this ->streamFilter = stream_filter_append (STDOUT , 'CITestStreamFilter ' );
You can’t perform that action at this time.
0 commit comments