Пример #1
0
 public function setUp()
 {
     $this->config = $this->getMock('Cm\\RedisSession\\Handler\\ConfigInterface', [], [], '', false);
     $this->config->expects($this->once())->method('getLogLevel')->willReturn(LoggerInterface::DEBUG);
     $this->psrLogger = $this->getMock('Psr\\Log\\LoggerInterface', [], [], '', false);
     $this->request = $this->getMock('Magento\\Framework\\App\\Request\\Http', [], [], '', false);
     //$this->logger = new Logger($this->config, $this->psrLogger, $this->request);
     $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
     $this->logger = $objectManager->getObject('Magento\\Framework\\Session\\SaveHandler\\Redis\\Logger', ['config' => $this->config, 'logger' => $this->psrLogger, 'request' => $this->request]);
 }