Move AppMode

This commit is contained in:
Philipp Holzer 2019-03-14 02:36:49 +01:00
parent c567328ab2
commit 505d8c18d0
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
8 changed files with 54 additions and 36 deletions

View file

@ -36,15 +36,16 @@ class ApiTest extends DatabaseTest
*/
public function setUp()
{
$basedir = BasePath::create(dirname(__DIR__) . '/../');
$configLoader = new Cache\ConfigCacheLoader($basedir);
$basePath = BasePath::create(dirname(__DIR__) . '/../');
$mode = new App\Mode($basePath);
$configLoader = new Cache\ConfigCacheLoader($basePath, $mode);
$configCache = Factory\ConfigFactory::createCache($configLoader);
$profiler = Factory\ProfilerFactory::create($configCache);
Factory\DBFactory::init($configCache, $profiler, $_SERVER);
$config = Factory\ConfigFactory::createConfig($configCache);
Factory\ConfigFactory::createPConfig($configCache);
$logger = Factory\LoggerFactory::create('test', $config, $profiler);
$this->app = new App($config, $logger, $profiler, false);
$this->app = new App($config, $mode, $logger, $profiler, false);
parent::setUp();