test: update failed tests

This commit is contained in:
kenjis 2023-04-07 09:33:56 +09:00
parent 7a0d1e4e21
commit 35f9a1dda3
No known key found for this signature in database
GPG Key ID: BD254878922AF198
2 changed files with 8 additions and 5 deletions

View File

@ -32,6 +32,7 @@ use Config\App;
use Config\Cookie;
use Config\Logger;
use Config\Modules;
use Config\Routing;
use Config\Services;
use Kint;
use RuntimeException;
@ -124,7 +125,8 @@ final class CommonFunctionsTest extends CIUnitTestCase
$response = $this->createMock(Response::class);
$routes = new RouteCollection(
Services::locator(),
new Modules()
new Modules(),
new Routing()
);
Services::injectMock('response', $response);
Services::injectMock('routes', $routes);
@ -389,7 +391,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
$this->config = new App();
$this->config->baseURL = 'http://example.com/';
$this->routes = new RouteCollection(Services::locator(), new Modules());
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
Services::injectMock('routes', $this->routes);
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());
@ -424,7 +426,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
$this->config = new App();
$this->config->baseURL = 'http://example.com/';
$this->routes = new RouteCollection(Services::locator(), new Modules());
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
Services::injectMock('routes', $this->routes);
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());
@ -459,7 +461,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
$this->config = new App();
$this->config->baseURL = 'http://example.com/';
$this->routes = new RouteCollection(Services::locator(), new Modules());
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
Services::injectMock('routes', $this->routes);
$this->request = new MockIncomingRequest($this->config, new URI('http://example.com'), null, new UserAgent());

View File

@ -19,6 +19,7 @@ use CodeIgniter\Test\Mock\MockIncomingRequest;
use CodeIgniter\Validation\Validation;
use Config\App;
use Config\Modules;
use Config\Routing;
use Config\Services;
/**
@ -47,7 +48,7 @@ final class RedirectResponseTest extends CIUnitTestCase
$this->config = new App();
$this->config->baseURL = 'http://example.com/';
$this->routes = new RouteCollection(Services::locator(), new Modules());
$this->routes = new RouteCollection(Services::locator(), new Modules(), new Routing());
Services::injectMock('routes', $this->routes);
$this->request = new MockIncomingRequest(