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