+ $this->dice = (new Dice())
+ ->addRules(include __DIR__ . '/../../static/dependencies.config.php')
+ ->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true]);
+ BaseObject::setDependencyInjection($this->dice);
+
+ /** @var Database $dba */
+ $dba = $this->dice->create(Database::class);
+
+ /** @var Configuration $config */
+ $this->config = $this->dice->create(Configuration::class);
+
+ $this->config->set('system', 'url', 'http://localhost');
+ $this->config->set('system', 'hostname', 'localhost');
+ $this->config->set('system', 'worker_dont_fork', true);
+
+ // Default config
+ $this->config->set('config', 'hostname', 'localhost');
+ $this->config->set('system', 'throttle_limit_day', 100);
+ $this->config->set('system', 'throttle_limit_week', 100);
+ $this->config->set('system', 'throttle_limit_month', 100);
+ $this->config->set('system', 'theme', 'system_theme');
+
+ // Load the API dataset for the whole API
+ $this->loadFixture(__DIR__ . '/../datasets/api.fixture.php', $dba);
+
+ /** @var App app */
+ $this->app = BaseObject::getApp();
+
+ $this->app->argc = 1;
+ $this->app->argv = ['home'];
+