mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-03 07:26:12 +00:00
Fix test
This commit is contained in:
parent
11e78286cb
commit
99e4b96a29
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user