mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix tests
This commit is contained in:
parent
b1b7fb6401
commit
f683e45b6e
@ -57,15 +57,6 @@ class ListAccompanyingPeriodTest extends AbstractExportTest
|
||||
$centerRepository = self::getContainer()->get(CenterRepositoryInterface::class);
|
||||
$scopeRepository = self::getContainer()->get(ScopeRepositoryInterface::class);
|
||||
|
||||
// mock security
|
||||
$user = $em->createQuery('SELECT u FROM '.User::class.' u')
|
||||
->setMaxResults(1)->getSingleResult();
|
||||
if (null === $user) {
|
||||
throw new \RuntimeException('no user found');
|
||||
}
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->getUser()->willReturn($user);
|
||||
|
||||
// mock authorization helper
|
||||
$scopes = $scopeRepository->findAll();
|
||||
$scopesConfidentials = [] !== $scopes ? [$scopes[0]] : [];
|
||||
@ -80,7 +71,6 @@ class ListAccompanyingPeriodTest extends AbstractExportTest
|
||||
$rollingDateConverter,
|
||||
$listAccompanyingPeriodHelper,
|
||||
new FilterListAccompanyingPeriodHelper(
|
||||
$security->reveal(),
|
||||
$centerRepository,
|
||||
$authorizationHelper->reveal(),
|
||||
$this->getParameters(true)
|
||||
@ -92,7 +82,6 @@ class ListAccompanyingPeriodTest extends AbstractExportTest
|
||||
$rollingDateConverter,
|
||||
$listAccompanyingPeriodHelper,
|
||||
new FilterListAccompanyingPeriodHelper(
|
||||
$security->reveal(),
|
||||
$centerRepository,
|
||||
$authorizationHelper->reveal(),
|
||||
$this->getParameters(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user