From 077415f67b38017758b999739ef531c749877af2 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 17 Apr 2023 19:44:57 +0200 Subject: [PATCH] test fixes --- tests/Controller/ApiControllerTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 640b51e..c46e51f 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -23,6 +23,7 @@ use phpOMS\Application\ApplicationAbstract; use phpOMS\DataStorage\Session\HttpSession; use phpOMS\Dispatcher\Dispatcher; use phpOMS\Event\EventManager; +use phpOMS\Localization\L11nManager; use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\HttpResponse; use phpOMS\Module\ModuleAbstract; @@ -56,7 +57,8 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase }; $this->app->dbPool = $GLOBALS['dbpool']; - $this->app->unitId = 1; + $this->app->unitId = 1; + $this->app->appId = 1; $this->app->accountManager = new AccountManager($GLOBALS['session']); $this->app->appSettings = new CoreSettings(); $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/'); @@ -64,13 +66,14 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->app->eventManager = new EventManager($this->app->dispatcher); $this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php'); $this->app->sessionManager = new HttpSession(36000); + $this->app->l11nManager = new L11nManager(); $account = new Account(); TestUtils::setMember($account, 'id', 1); $permission = new AccountPermission(); $permission->setUnit(1); - $permission->setApp('api'); + $permission->setApp(1); $permission->setPermission( PermissionType::READ | PermissionType::CREATE