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


PHP EventDispatcherInterface::reveal方法代码示例

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


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

示例1: setUp

 protected function setUp()
 {
     $this->taskExecutionRepository = $this->prophesize(TaskExecutionRepositoryInterface::class);
     $this->taskHandlerFactory = $this->prophesize(TaskHandlerFactoryInterface::class);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->taskRunner = new TaskRunner($this->taskExecutionRepository->reveal(), $this->taskHandlerFactory->reveal(), $this->eventDispatcher->reveal());
 }
开发者ID:php-task,项目名称:php-task,代码行数:7,代码来源:TaskRunnerTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mockClient = $this->prophesize(AcmeClient::class);
     $this->mockDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->service = new Challenger($this->mockClient->reveal(), $this->mockDispatcher->reveal());
 }
开发者ID:acmephp,项目名称:symfony-bundle,代码行数:7,代码来源:ChallengerTest.php

示例3: setUp

 protected function setUp()
 {
     $this->channel = $this->prophesize(AMQPChannel::class);
     $this->serializer = $this->prophesize(Serializer::class);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->parser = $this->prophesize(Parser::class);
     $this->manager = new ConsumerManager($this->channel->reveal(), self::EXCHANGE_NAME, $this->serializer->reveal(), $this->parser->reveal());
     $this->manager->setEventDispatcher($this->eventDispatcher->reveal());
 }
开发者ID:rebuy-de,项目名称:amqp-php-consumer,代码行数:9,代码来源:ManagerTest.php

示例4: setUp

 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());
 }
开发者ID:Silwereth,项目名称:sulu,代码行数:10,代码来源:SymfonyAccessControlManagerTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mockClient = $this->prophesize(AcmeClient::class);
     $this->mockKeyPairFactory = $this->prophesize(DomainKeyPairProviderFactory::class);
     $this->mockChallenger = $this->prophesize(Challenger::class);
     $this->mockCertificateRepository = $this->prophesize(CertificateRepository::class);
     $this->mockDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->service = new Requester($this->mockClient->reveal(), $this->mockKeyPairFactory->reveal(), $this->mockChallenger->reveal(), $this->mockCertificateRepository->reveal(), $this->mockDispatcher->reveal());
 }
开发者ID:acmephp,项目名称:symfony-bundle,代码行数:10,代码来源:RequesterTest.php

示例6: testHandleQueryExecute

 /**
  * It should handle query execution and set the result.
  */
 public function testHandleQueryExecute()
 {
     $locale = 'fr';
     $primarySelector = 'p';
     $this->query->getLocale()->willReturn($locale);
     $this->query->getPhpcrQuery()->willReturn($this->phpcrQuery->reveal());
     $this->phpcrQuery->execute()->willReturn($this->phpcrResult->reveal());
     $this->query->getPrimarySelector()->willReturn($primarySelector);
     $this->queryExecuteEvent->getQuery()->willReturn($this->query->reveal());
     $this->queryExecuteEvent->getOptions()->willReturn([]);
     $this->queryExecuteEvent->setResult(new QueryResultCollection($this->phpcrResult->reveal(), $this->dispatcher->reveal(), $locale))->shouldBeCalled();
     $this->subscriber->handleQueryExecute($this->queryExecuteEvent->reveal());
 }
开发者ID:hason,项目名称:sulu-document-manager,代码行数:16,代码来源:QuerySubscriberTest.php

示例7: setUp

 public function setUp()
 {
     $this->dispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->manager = new NotificationManager();
     $this->manager->setEventDispatcher($this->dispatcher->reveal());
 }
开发者ID:fazland,项目名称:notifire,代码行数:6,代码来源:NotificationManagerTest.php

示例8: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->moduleHandler = $this->prophesize(ModuleHandlerInterface::class);
     $this->moduleHandler->getImplementations('entity_type_build')->willReturn([]);
     $this->moduleHandler->alter('entity_type', Argument::type('array'))->willReturn(NULL);
     $this->moduleHandler->alter('entity_base_field_info', Argument::type('array'), Argument::any())->willReturn(NULL);
     $this->moduleHandler->alter('entity_bundle_field_info', Argument::type('array'), Argument::any(), Argument::type('string'))->willReturn(NULL);
     $this->cacheBackend = $this->prophesize(CacheBackendInterface::class);
     $this->cacheTagsInvalidator = $this->prophesize(CacheTagsInvalidatorInterface::class);
     $language = new Language(['id' => 'en']);
     $this->languageManager = $this->prophesize(LanguageManagerInterface::class);
     $this->languageManager->getCurrentLanguage()->willReturn($language);
     $this->languageManager->getLanguages()->willReturn(['en' => (object) ['id' => 'en']]);
     $this->typedDataManager = $this->prophesize(TypedDataManager::class);
     $this->typedDataManager->getDefinition('field_item:boolean')->willReturn(['class' => BooleanItem::class]);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->keyValueFactory = $this->prophesize(KeyValueFactoryInterface::class);
     $this->container = $this->prophesize(ContainerInterface::class);
     $this->container->get('cache_tags.invalidator')->willReturn($this->cacheTagsInvalidator->reveal());
     $this->container->get('typed_data_manager')->willReturn($this->typedDataManager->reveal());
     \Drupal::setContainer($this->container->reveal());
     $this->discovery = $this->prophesize(DiscoveryInterface::class);
     $translation_manager = $this->prophesize(TranslationInterface::class);
     $this->entityManager = new TestEntityManager(new \ArrayObject(), $this->moduleHandler->reveal(), $this->cacheBackend->reveal(), $this->languageManager->reveal(), $translation_manager->reveal(), $this->getClassResolverStub(), $this->typedDataManager->reveal(), $this->keyValueFactory->reveal(), $this->eventDispatcher->reveal());
     $this->entityManager->setContainer($this->container->reveal());
     $this->entityManager->setDiscovery($this->discovery->reveal());
 }
开发者ID:HakS,项目名称:drupal8_training,代码行数:31,代码来源:EntityManagerTest.php

示例9: setUp

 public function setUp()
 {
     $this->maskConverter = $this->prophesize(MaskConverterInterface::class);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->accessControlManager = new AccessControlManager($this->maskConverter->reveal(), $this->eventDispatcher->reveal());
 }
开发者ID:ollietb,项目名称:sulu,代码行数:6,代码来源:AccessControlManagerTest.php

示例10: getNanbando

 protected function getNanbando(array $backup)
 {
     return new Nanbando($backup, $this->storage->reveal(), $this->databaseFactory->reveal(), $this->eventDispatcher->reveal());
 }
开发者ID:nanbando,项目名称:core,代码行数:4,代码来源:NanbandoTest.php


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