本文整理匯總了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');
}
示例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());
}
示例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);
}
示例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');
}
示例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');
}
示例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());
}
示例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());
}
示例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');
}
示例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());
}
示例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());
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->mockLogger = $this->prophesize(LoggerInterface::class);
$this->service = new LogCommandListener($this->mockLogger->reveal());
}
示例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());
}
示例13: setUp
protected function setUp()
{
$this->logger = $this->prophesize(LoggerInterface::class);
$this->subscriber = new LogSubscriber($this->logger->reveal());
}