本文整理汇总了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());
}
示例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);
}
示例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);
}