Add App\Router dependency injection to App
- Moved collectRoutes method from App to App\Router
This commit is contained in:
@@ -50,6 +50,7 @@ class ApiTest extends DatabaseTest
|
||||
{
|
||||
$basePath = BasePath::create(dirname(__DIR__) . '/../');
|
||||
$mode = new App\Mode($basePath);
|
||||
$router = new App\Router();
|
||||
$configLoader = new ConfigFileLoader($basePath, $mode);
|
||||
$configCache = Factory\ConfigFactory::createCache($configLoader);
|
||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||
@@ -57,7 +58,7 @@ class ApiTest extends DatabaseTest
|
||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||
Factory\ConfigFactory::createPConfig($configCache);
|
||||
$logger = Factory\LoggerFactory::create('test', $config, $profiler);
|
||||
$this->app = new App($config, $mode, $logger, $profiler, false);
|
||||
$this->app = new App($config, $mode, $router, $logger, $profiler, false);
|
||||
|
||||
parent::setUp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user