From a3b7f30b59bcdd7ca0fda04e1a4c5c9167439203 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 29 Sep 2023 02:38:01 +0000 Subject: [PATCH] fix tests --- Controller/ApiController.php | 2 +- tests/Controller/ApiControllerTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 2d37f58..16c93a0 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -64,7 +64,7 @@ final class ApiController extends Controller $session = $this->createSessionFromRequest($request); if ($session === null) { - $response->header->status = RequestStatusCode::R_400; + $response->header->status = RequestStatusCode::R_403; $this->createInvalidCreateResponse($request, $response, $session); return; diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index e6f89e3..a0172be 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -61,6 +61,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; + protected int $appId = 1; }; $this->app->dbPool = $GLOBALS['dbpool'];