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

@@ -6,6 +6,7 @@ namespace Validator\Person;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter;
use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenterValidator;
@@ -48,7 +49,7 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
]
]);
$centerResolverDispatcher = $this->createMock(CenterResolverDispatcher::class);
$centerResolverDispatcher = $this->createMock(CenterResolverDispatcherInterface::class);
return new PersonHasCenterValidator($parameterBag, $centerResolverDispatcher);
}