mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: update failed tests
This commit is contained in:
parent
7a0d1e4e21
commit
35f9a1dda3
@ -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());
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user