当前位置: 首页>>代码示例>>PHP>>正文


PHP TokenStorageInterface::reveal方法代码示例

本文整理汇总了PHP中Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface::reveal方法的典型用法代码示例。如果您正苦于以下问题:PHP TokenStorageInterface::reveal方法的具体用法?PHP TokenStorageInterface::reveal怎么用?PHP TokenStorageInterface::reveal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface的用法示例。


在下文中一共展示了TokenStorageInterface::reveal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->tokenStorage = $this->prophesize(TokenStorageInterface::class);
     $this->tokenStorage->getToken()->willReturn(true);
     // stands for a valid token
     $this->authorizationChecker = $this->prophesize(AuthorizationCheckerInterface::class);
     $this->securityChecker = new SecurityChecker($this->tokenStorage->reveal(), $this->authorizationChecker->reveal());
 }
开发者ID:Silwereth,项目名称:sulu,代码行数:9,代码来源:SecurityCheckerTest.php

示例2: setUp

 public function setUp()
 {
     $this->user = $this->prophesize(UserInterface::class);
     $this->token = $this->prophesize(TokenInterface::class);
     $this->token->getUser()->willReturn($this->user);
     $this->accessControlManager = $this->prophesize(AccessControlManagerInterface::class);
     $this->tokenStorage = $this->prophesize(TokenStorageInterface::class);
     $this->tokenStorage->getToken()->willReturn($this->token->reveal());
     $this->securedEntitySubscriber = new SecuredEntitySubscriber($this->accessControlManager->reveal(), $this->tokenStorage->reveal());
     $this->visitor = $this->prophesize(GenericSerializationVisitor::class);
     $this->objectEvent = $this->prophesize(ObjectEvent::class);
     $this->objectEvent->getVisitor()->willReturn($this->visitor);
 }
开发者ID:Silwereth,项目名称:sulu,代码行数:13,代码来源:SecuredEntitySubscriberTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mediaRepository = $this->prophesize(MediaRepositoryInterface::class);
     $this->collectionRepository = $this->prophesize(CollectionRepositoryInterface::class);
     $this->userRepository = $this->prophesize(UserRepositoryInterface::class);
     $this->em = $this->prophesize(EntityManager::class);
     $this->storage = $this->prophesize(StorageInterface::class);
     $this->validator = $this->prophesize(FileValidatorInterface::class);
     $this->formatManager = $this->prophesize(FormatManagerInterface::class);
     $this->tagManager = $this->prophesize(TagManagerInterface::class);
     $this->typeManager = $this->prophesize(TypeManagerInterface::class);
     $this->pathCleaner = $this->prophesize(PathCleanupInterface::class);
     $this->tokenStorage = $this->prophesize(TokenStorageInterface::class);
     $this->securityChecker = $this->prophesize(SecurityCheckerInterface::class);
     $this->ffprobe = $this->prophesize(FFProbe::class);
     $this->mediaManager = new MediaManager($this->mediaRepository->reveal(), $this->collectionRepository->reveal(), $this->userRepository->reveal(), $this->em->reveal(), $this->storage->reveal(), $this->validator->reveal(), $this->formatManager->reveal(), $this->tagManager->reveal(), $this->typeManager->reveal(), $this->pathCleaner->reveal(), $this->tokenStorage->reveal(), $this->securityChecker->reveal(), $this->ffprobe->reveal(), ['view' => 64], '/', 0);
 }
开发者ID:webs86,项目名称:sulu,代码行数:18,代码来源:MediaManagerTest.php


注:本文中的Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface::reveal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。