コード例 #1
0
 public function testSetProcessors()
 {
     $this->sut->setProcessors(array($expected = 'MyProcessorService'));
     self::assertInternalType('array', $this->sut->getProcessors());
     self::assertContains($expected, $this->sut->getProcessors());
 }
コード例 #2
0
 public function testCreateLoggerWithProcessor()
 {
     $options = new MonologOptions();
     $options->setProcessors(array('\\Monolog\\Processor\\MemoryUsageProcessor'));
     $serviceManager = new ServiceManager();
     $factory = new MonologServiceFactory();
     $actual = $factory->createLogger($serviceManager, $options);
     self::assertInstanceOf('\\Monolog\\Logger', $actual);
     self::assertInstanceOf('\\Monolog\\Processor\\MemoryUsageProcessor', $actual->popProcessor());
 }