Exemplo n.º 1
0
 /**
  * @test
  */
 public function dispatchFailedIsLogged()
 {
     $command = $this->getMockBuilder(Command::class)->getMock();
     $logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
     $logger->expects(self::once())->method('error');
     $commandLogger = new CommandLogger($logger);
     $commandLogger->onDispatchFailed($command, new \Exception('Something is wrong.'));
 }
Exemplo n.º 2
0
 /**
  * @param Command $command
  * @param \Exception $exception
  * @return void
  */
 public function onDispatchFailed(Command $command, \Exception $exception)
 {
     $this->logger->onDispatchFailed($command, $exception);
 }