/** * {@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'); }
/** * {@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'); }