From 99e4b96a29197bf1200ea18939efc64f31a3aa05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 2 Jul 2025 14:17:35 +0200 Subject: [PATCH] Fix test --- .../Helper/FilterListAccompanyingPeriodHelperTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php index c5b1deb1f..ccd3ff16a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php @@ -17,6 +17,7 @@ use Chill\MainBundle\Entity\User; use Chill\MainBundle\Repository\CenterRepositoryInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Security\Authorization\AuthorizationHelperForCurrentUserInterface; +use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Helper\FilterListAccompanyingPeriodHelper; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; @@ -67,10 +68,10 @@ final class FilterListAccompanyingPeriodHelperTest extends KernelTestCase // mock authorization helper $scopes = $this->scopeRepository->findAll(); $scopesConfidentials = [] !== $scopes ? [$scopes[0]] : []; - $authorizationHelper = $this->prophesize(AuthorizationHelperForCurrentUserInterface::class); - $authorizationHelper->getReachableScopes(AccompanyingPeriodVoter::SEE_DETAILS, Argument::type(Center::class)) + $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class); + $authorizationHelper->getReachableScopes($user, AccompanyingPeriodVoter::SEE_DETAILS, Argument::type(Center::class)) ->willReturn($scopes); - $authorizationHelper->getReachableScopes(AccompanyingPeriodVoter::SEE_CONFIDENTIAL_ALL, Argument::type(Center::class)) + $authorizationHelper->getReachableScopes($user, AccompanyingPeriodVoter::SEE_CONFIDENTIAL_ALL, Argument::type(Center::class)) ->willReturn($scopesConfidentials); $filter = new FilterListAccompanyingPeriodHelper(