From b70de50f041d5438ecac15850998d7cbde414304 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 25 Apr 2024 15:28:40 +0000 Subject: [PATCH] fix tests --- Controller/BackendController.php | 6 +++--- tests/Models/RiskMapperTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 81789b0..3e70508 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -113,11 +113,11 @@ final class BackendController extends Controller } if ($risk->category !== null && $risk->category->id !== 0) { - if (!isset($statsCategories[$view->data['categories'][$risk->category->id]->title])) { - $statsCategories[$view->data['categories'][$risk->category->id]->title] = []; + if (!isset($statsCategories[$view->data['categories'][$risk->category->id]->getL11n()])) { + $statsCategories[$view->data['categories'][$risk->category->id]->getL11n()] = []; } - $statsCategories[$view->data['categories'][$risk->category->id]->title][] = $risk; + $statsCategories[$view->data['categories'][$risk->category->id]->getL11n()][] = $risk; } } diff --git a/tests/Models/RiskMapperTest.php b/tests/Models/RiskMapperTest.php index 4481156..ef67c2d 100755 --- a/tests/Models/RiskMapperTest.php +++ b/tests/Models/RiskMapperTest.php @@ -51,7 +51,7 @@ final class RiskMapperTest extends \PHPUnit\Framework\TestCase $obj->project = new NullProject(1); $obj->responsible = new NullAccount(1); - $obj->deputy = 1; + $obj->deputy = new NullAccount(1); $causeObj = new Cause(); $causeObj->title = 'Risk Test Cause';