- $basedir = BasePath::create(dirname(__DIR__) . '/../../');
- $configLoader = new Config\ConfigCacheLoader($basedir);
- $config = Factory\ConfigFactory::createCache($configLoader);
- $logger = Factory\LoggerFactory::create('test', $config);
- $this->app = new App($config, $logger, false);
- $this->logOutput = FActory\LoggerFactory::enableTest($this->app->getLogger());
+ $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);
+ Factory\DBFactory::init($basePath, $configCache, $profiler, $_SERVER);
+ $config = Factory\ConfigFactory::createConfig($configCache);
+ Factory\ConfigFactory::createPConfig($configCache);
+ $logger = Factory\LoggerFactory::create('test', $config, $profiler);
+ $baseUrl = new BaseURL($config, $_SERVER);
+ $this->app = new App($config, $mode, $router, $baseUrl, $logger, $profiler, false);