mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-03 15:36:14 +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\CenterRepositoryInterface;
|
||||||
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
|
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelperForCurrentUserInterface;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelperForCurrentUserInterface;
|
||||||
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Export\Helper\FilterListAccompanyingPeriodHelper;
|
use Chill\PersonBundle\Export\Helper\FilterListAccompanyingPeriodHelper;
|
||||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||||
@ -67,10 +68,10 @@ final class FilterListAccompanyingPeriodHelperTest extends KernelTestCase
|
|||||||
// mock authorization helper
|
// mock authorization helper
|
||||||
$scopes = $this->scopeRepository->findAll();
|
$scopes = $this->scopeRepository->findAll();
|
||||||
$scopesConfidentials = [] !== $scopes ? [$scopes[0]] : [];
|
$scopesConfidentials = [] !== $scopes ? [$scopes[0]] : [];
|
||||||
$authorizationHelper = $this->prophesize(AuthorizationHelperForCurrentUserInterface::class);
|
$authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class);
|
||||||
$authorizationHelper->getReachableScopes(AccompanyingPeriodVoter::SEE_DETAILS, Argument::type(Center::class))
|
$authorizationHelper->getReachableScopes($user, AccompanyingPeriodVoter::SEE_DETAILS, Argument::type(Center::class))
|
||||||
->willReturn($scopes);
|
->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);
|
->willReturn($scopesConfidentials);
|
||||||
|
|
||||||
$filter = new FilterListAccompanyingPeriodHelper(
|
$filter = new FilterListAccompanyingPeriodHelper(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user