tests: Fix "...Class "Chill\MainBundle\Security\Resolver\CenterResolverDispatcher" is declared "final" and cannot be mocked....".

This commit is contained in:
Pol Dellaiera
2021-11-23 12:13:47 +01:00
parent 45063fa6fe
commit 70ed9e75db
15 changed files with 80 additions and 82 deletions

View File

@@ -1,9 +1,11 @@
<?php
declare(strict_types=1);
namespace Chill\TaskBundle\Repository;
use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\TaskBundle\Entity\SingleTask;
@@ -17,10 +19,10 @@ final class SingleTaskAclAwareRepository implements SingleTaskAclAwareRepository
private AuthorizationHelperInterface $authorizationHelper;
private EntityManagerInterface $em;
private Security $security;
private CenterResolverDispatcher $centerResolverDispatcher;
private CenterResolverDispatcherInterface $centerResolverDispatcher;
public function __construct(
CenterResolverDispatcher $centerResolverDispatcher,
CenterResolverDispatcherInterface $centerResolverDispatcher,
EntityManagerInterface $em,
Security $security,
AuthorizationHelperInterface $authorizationHelper