/** * @test */ public function beforeDispatchIsLogged() { $command = $this->getMockBuilder(Command::class)->getMock(); $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); $logger->expects(self::once())->method('info'); $commandLogger = new CommandLogger($logger); $commandLogger->onBeforeDispatch($command); }
/** * @param Command $command * @return void */ public function onBeforeDispatch(Command $command) { $this->logger->onBeforeDispatch($command); }