/** * Tests setLogger(). */ public function testSetLogger() { $logger = Phake::mock('\\Psr\\Log\\LoggerInterface'); $this->plugin->setLogger($logger); $this->assertSame($logger, $this->plugin->getLogger()); }
/** * Set Logger Interface * @param LoggerInterface $logger * @return null */ public function setLogger(LoggerInterface $logger) { parent::setLogger($logger); foreach ($this->plugins as $plugin) { if (!$plugin instanceof LoggerAwareInterface) { continue; } $plugin->setLogger($logger); } }