Skip to content

Commit 35f9a1d

Browse files
committed
test: update failed tests
1 parent 7a0d1e4 commit 35f9a1d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/system/CommonFunctionsTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use Config\Cookie;
3333
use Config\Logger;
3434
use Config\Modules;
35+
use Config\Routing;
3536
use Config\Services;
3637
use Kint;
3738
use RuntimeException;
@@ -124,7 +125,8 @@ public function testRedirectReturnsRedirectResponse()
124125
$response = $this->createMock(Response::class);
125126
$routes = new RouteCollection(
126127
Services::locator(),
127-
new Modules()
128+
new Modules(),
129+
new Routing()
128130
);
129131
Services::injectMock('response', $response);
130132
Services::injectMock('routes', $routes);
@@ -389,7 +391,7 @@ public function testOldInput()
389391
$this->config = new App();
390392
$this->config->baseURL = 'http://example.com/';
391393

392-
$this->routes = new RouteCollection(Services::locator(), new Modules());
394+
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
393395
Services::injectMock('routes', $this->routes);
394396

395397
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());
@@ -424,7 +426,7 @@ public function testOldInputSerializeData()
424426
$this->config = new App();
425427
$this->config->baseURL = 'http://example.com/';
426428

427-
$this->routes = new RouteCollection(Services::locator(), new Modules());
429+
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
428430
Services::injectMock('routes', $this->routes);
429431

430432
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());
@@ -459,7 +461,7 @@ public function testOldInputArray()
459461
$this->config = new App();
460462
$this->config->baseURL = 'http://example.com/';
461463

462-
$this->routes = new RouteCollection(Services::locator(), new Modules());
464+
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
463465
Services::injectMock('routes', $this->routes);
464466

465467
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());

tests/system/HTTP/RedirectResponseTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use CodeIgniter\Validation\Validation;
2020
use Config\App;
2121
use Config\Modules;
22+
use Config\Routing;
2223
use Config\Services;
2324

2425
/**
@@ -47,7 +48,7 @@ protected function setUp(): void
4748
$this->config = new App();
4849
$this->config->baseURL = 'http://example.com/';
4950

50-
$this->routes = new RouteCollection(Services::locator(), new Modules());
51+
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
5152
Services::injectMock('routes', $this->routes);
5253

5354
$this->request = new MockIncomingRequest(

0 commit comments

Comments
 (0)