コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->aclProvider = $this->prophesize(MutableAclProviderInterface::class);
     $this->objectIdentityRetrievalStrategy = $this->prophesize(ObjectIdentityRetrievalStrategyInterface::class);
     $this->securityIdentityRetrievalStrategy = $this->prophesize(SecurityIdentityRetrievalStrategyInterface::class);
     $this->permissionMap = $this->prophesize(PermissionMapInterface::class);
     $this->token = $this->prophesize(TokenInterface::class);
     $this->accessControlVoter = new AccessControlVoter($this->aclProvider->reveal(), $this->objectIdentityRetrievalStrategy->reveal(), $this->securityIdentityRetrievalStrategy->reveal(), $this->permissionMap->reveal());
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->aclProvider = $this->prophesize(MutableAclProviderInterface::class);
     $this->maskConverter = $this->prophesize(MaskConverterInterface::class);
     $this->securityIdentity = new RoleSecurityIdentity('ROLE_SULU_ADMINISTRATOR');
     $this->acl = $this->prophesize(MutableAclInterface::class);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->accessControlManager = new SymfonyAccessControlManager($this->aclProvider->reveal(), $this->maskConverter->reveal(), $this->eventDispatcher->reveal());
 }