diff --git a/tests/Module/ModuleManagerTest.php b/tests/Module/ModuleManagerTest.php index 435d61510..3efab3bc0 100644 --- a/tests/Module/ModuleManagerTest.php +++ b/tests/Module/ModuleManagerTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace phpOMS\tests\Module; +use Model\CoreSettings; use phpOMS\Application\ApplicationAbstract; use phpOMS\Dispatcher\Dispatcher; use phpOMS\Message\Http\HttpRequest; @@ -35,12 +36,13 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase protected function setUp() : void { - $this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; }; - $this->app->appName = 'Api'; - $this->app->dbPool = $GLOBALS['dbpool']; - $this->app->router = new WebRouter(); - $this->app->dispatcher = new Dispatcher($this->app); - $this->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); + $this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; }; + $this->app->appName = 'Api'; + $this->app->dbPool = $GLOBALS['dbpool']; + $this->app->router = new WebRouter(); + $this->app->dispatcher = new Dispatcher($this->app); + $this->app->appSettings = new CoreSettings($this->app->dbPool->get('admin')); + $this->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); } /**