當前位置: 首頁>>代碼示例>>PHP>>正文


PHP LoggerInterface::reveal方法代碼示例

本文整理匯總了PHP中Psr\Log\LoggerInterface::reveal方法的典型用法代碼示例。如果您正苦於以下問題:PHP LoggerInterface::reveal方法的具體用法?PHP LoggerInterface::reveal怎麽用?PHP LoggerInterface::reveal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Psr\Log\LoggerInterface的用法示例。


在下文中一共展示了LoggerInterface::reveal方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     // Mock a logger.
     $this->logger = $this->prophesize(LoggerInterface::class);
     // Mock the logger service, make it return our mocked logger, and register
     // it in the container.
     $this->loggerFactory = $this->prophesize(LoggerChannelFactoryInterface::class);
     $this->loggerFactory->get('rules')->willReturn($this->logger->reveal());
     $this->container->set('logger.factory', $this->loggerFactory->reveal());
     // Mock a parameter bag.
     $this->parameterBag = $this->prophesize(ParameterBag::class);
     // Mock a request, and set our mocked parameter bag as it attributes
     // property.
     $this->currentRequest = $this->prophesize(Request::class);
     $this->currentRequest->attributes = $this->parameterBag->reveal();
     // Mock the request stack, make it return our mocked request when the
     // current request is requested, and register it in the container.
     $this->requestStack = $this->prophesize(RequestStack::class);
     $this->requestStack->getCurrentRequest()->willReturn($this->currentRequest);
     $this->container->set('request_stack', $this->requestStack->reveal());
     // Mock the current path stack.
     $this->currentPathStack = $this->prophesize(CurrentPathStack::class);
     $this->container->set('path.current', $this->currentPathStack->reveal());
     // Instantiate the redirect action.
     $this->action = $this->actionManager->createInstance('rules_page_redirect');
 }
開發者ID:Progressable,項目名稱:openway8,代碼行數:30,代碼來源:SystemPageRedirectTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->messageSerializer = $this->prophesize(MessageSerializer::class);
     $this->SUT = new CommandAuditor($this->logger->reveal(), $this->messageSerializer->reveal());
 }
開發者ID:legalweb,項目名稱:psb-command-auditing,代碼行數:7,代碼來源:CommandAuditorTest.php

示例3: setUp

 protected function setUp()
 {
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->handler = new LogHandler($this->logger->reveal());
     $this->consumerContainer = $this->prophesize(ConsumerContainer::class);
     $this->consumerContainer->getMessageClass()->willReturn(self::MESSAGE_CLASS);
 }
開發者ID:rebuy-de,項目名稱:amqp-php-consumer,代碼行數:7,代碼來源:LoggerHandlerTest.php

示例4: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->mailManager = $this->prophesize(MailManagerInterface::class);
     $this->container->set('logger.factory', $this->logger->reveal());
     $this->container->set('plugin.manager.mail', $this->mailManager->reveal());
     $this->action = $this->actionManager->createInstance('rules_send_email');
 }
開發者ID:shahinam,項目名稱:drupal8devel,代碼行數:12,代碼來源:SystemSendEmailTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->contentQueryExecutor = $this->prophesize('Sulu\\Component\\Content\\Query\\ContentQueryExecutorInterface');
     $this->contentQueryBuilder = $this->prophesize('Sulu\\Component\\Content\\Query\\ContentQueryBuilderInterface');
     $this->logger = $this->prophesize('Psr\\Log\\LoggerInterface');
     $this->property = $this->prophesize('Sulu\\Component\\Content\\Compat\\PropertyInterface');
     $this->type = new InternalLinks($this->contentQueryExecutor->reveal(), $this->contentQueryBuilder->reveal(), $this->logger->reveal(), 'some_template.html.twig');
 }
開發者ID:Silwereth,項目名稱:sulu,代碼行數:9,代碼來源:InternalLinksTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mockLogger = $this->prophesize(LoggerInterface::class);
     $this->mockManager = $this->prophesize(KeyPairManager::class);
     $this->mockStorage = $this->prophesize(KeyPairStorage::class);
     $this->mockStorage->getRootPath()->willReturn('~/.acme/certificates');
     $this->service = new KeyPairProvider($this->mockManager->reveal(), $this->mockStorage->reveal());
     $this->service->setLogger($this->mockLogger->reveal());
 }
開發者ID:acmephp,項目名稱:symfony-bundle,代碼行數:10,代碼來源:KeyPairProviderTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->logger = $this->createLoggerMock();
     $this->encoderMock = $this->createEncoderMock();
     $this->decoderMock = $this->createDecoderMock();
     $this->encoderResolverMock = $this->createEncoderResolverMock();
     $this->decoderResolverMock = $this->createDecoderResolverMock();
     $this->transcoderFactory = new TranscoderFactory($this->decoderResolverMock->reveal(), $this->encoderResolverMock->reveal(), $this->logger->reveal());
 }
開發者ID:brainbits,項目名稱:transcoder,代碼行數:10,代碼來源:TranscoderFactoryTest.php

示例8: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->logger = $this->prophesize(LoggerInterface::class);
     $logger_factory = $this->prophesize(LoggerChannelFactoryInterface::class);
     $logger_factory->get('rules')->willReturn($this->logger->reveal());
     $this->mailManager = $this->prophesize(MailManagerInterface::class);
     // @todo this is wrong, the logger is no factory.
     $this->container->set('logger.factory', $logger_factory->reveal());
     $this->container->set('plugin.manager.mail', $this->mailManager->reveal());
     $this->action = $this->actionManager->createInstance('rules_send_email');
 }
開發者ID:Progressable,項目名稱:openway8,代碼行數:15,代碼來源:SystemSendEmailTest.php

示例9: setUp

 public function setUp()
 {
     $this->apiKeyManager = $this->prophesize('AppBundle\\Security\\ApiKeyManager');
     $this->logger = $this->prophesize('Psr\\Log\\LoggerInterface');
     $this->apiKeyAuthenticator = new ApiKeyAuthenticator($this->apiKeyManager->reveal(), $this->logger->reveal());
 }
開發者ID:jlekowski,項目名稱:battleships-api,代碼行數:6,代碼來源:ApiKeyAuthenticatorTest.php

示例10: setUp

 /** {@inheritdoc} */
 protected function setUp()
 {
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->converter = $this->prophesize(ObjectToArrayConverterInterface::class);
     $this->logstash = new Logstash($this->logger->reveal(), $this->converter->reveal());
 }
開發者ID:ClearcodeHQ,項目名稱:SimpleBusElkBundle,代碼行數:7,代碼來源:LogstashTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->mockLogger = $this->prophesize(LoggerInterface::class);
     $this->service = new LogCommandListener($this->mockLogger->reveal());
 }
開發者ID:acmephp,項目名稱:symfony-bundle,代碼行數:6,代碼來源:LogCommandListenerTest.php

示例12: setUp

 /** {@inheritdoc} */
 protected function setUp()
 {
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->logstash = $this->prophesize(Logstash::class);
     $this->middleware = new LogEventMiddleware($this->logstash->reveal(), $this->logger->reveal());
 }
開發者ID:ClearcodeHQ,項目名稱:SimpleBusElkBundle,代碼行數:7,代碼來源:LogEventMiddlewareTest.php

示例13: setUp

 protected function setUp()
 {
     $this->logger = $this->prophesize(LoggerInterface::class);
     $this->subscriber = new LogSubscriber($this->logger->reveal());
 }
開發者ID:rebuy-de,項目名稱:amqp-php-consumer,代碼行數:5,代碼來源:LogSubscriberTest.php


注:本文中的Psr\Log\LoggerInterface::reveal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。