|
|
@@ -65,7 +65,7 @@ class AbstractVoterTest extends TestCase
|
|
|
{
|
|
|
protected Security | MockObject $security;
|
|
|
protected Utils | MockObject $accessUtils;
|
|
|
- protected EntityManagerInterface | MockObject $entityManager;
|
|
|
+ protected EntityManagerInterface | MockObject $em;
|
|
|
protected InternalRequestsService | MockObject $internalRequestsService;
|
|
|
protected SwitchUser | MockObject $switchUserService;
|
|
|
|
|
|
@@ -114,7 +114,7 @@ class AbstractVoterTest extends TestCase
|
|
|
$this->security = $this->getMockBuilder(Security::class)->disableOriginalConstructor()->getMock();
|
|
|
$this->accessUtils = $this->getMockBuilder(Utils::class)->disableOriginalConstructor()->getMock();
|
|
|
$this->internalRequestsService = $this->getMockBuilder(InternalRequestsService::class)->disableOriginalConstructor()->getMock();
|
|
|
- $this->entityManager = $this->getMockBuilder(EntityManagerInterface::class)->disableOriginalConstructor()->getMock();
|
|
|
+ $this->em = $this->getMockBuilder(EntityManagerInterface::class)->disableOriginalConstructor()->getMock();
|
|
|
$this->switchUserService = $this->getMockBuilder(SwitchUser::class)->disableOriginalConstructor()->getMock();
|
|
|
}
|
|
|
|
|
|
@@ -129,7 +129,7 @@ class AbstractVoterTest extends TestCase
|
|
|
$this->security,
|
|
|
$this->accessUtils,
|
|
|
$this->internalRequestsService,
|
|
|
- $this->entityManager,
|
|
|
+ $this->em,
|
|
|
$this->switchUserService
|
|
|
])
|
|
|
->setMethodsExcept([$methodName])
|
|
|
@@ -314,7 +314,7 @@ class AbstractVoterTest extends TestCase
|
|
|
$_SERVER['HTTP_X_SWITCH_USER'] = 1;
|
|
|
|
|
|
$this->security->expects(self::once())->method('getUser')->willReturn($originalUser);
|
|
|
- $this->entityManager->expects(self::once())->method('find')->with(Access::class, 1)->willReturn($switchUser);
|
|
|
+ $this->em->expects(self::once())->method('find')->with(Access::class, 1)->willReturn($switchUser);
|
|
|
|
|
|
$abstractVoter = $this->makeAbstractVoterMockFor('getUser');
|
|
|
|