From 44095561e2c8b3eafffd0eaa39148f234104623e 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index e3f91a4..c7fd55e 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -24,6 +24,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Application\ApplicationAbstract; use phpOMS\Dispatcher\Dispatcher; use phpOMS\Event\EventManager; +use phpOMS\Localization\L11nManager; use phpOMS\Module\ModuleManager; use phpOMS\Router\WebRouter; use phpOMS\Utils\TestUtils; @@ -55,6 +56,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules/'); $this->app->dispatcher = new Dispatcher($this->app); $this->app->eventManager = new EventManager($this->app->dispatcher); + $this->app->l11nManager = new L11nManager(); $this->app->eventManager->importFromFile(__DIR__ . '/../../../Web/Api/Hooks.php'); $this->app->router = new WebRouter(); @@ -64,7 +66,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $permission = new AccountPermission(); $permission->setUnit(1); - $permission->setApp('Api'); + $permission->setApp(1); $permission->setPermission( PermissionType::READ | PermissionType::CREATE