public function testEvent() { $process = new Process(''); $command = GitCommand::getInstance(); $event = new GitEvent($this->_wrapper, $process, $command); $this->assertEquals($this->_wrapper, $event->getWrapper()); $this->assertEquals($process, $event->getProcess()); $this->assertEquals($command, $event->getCommand()); }
/** * Adds a logg message using the level defined in the mappings. * * @param \GitWrapper\Event\GitEvent $event * @param string $message * @param array $context * * @throws \DomainException */ public function log(GitEvent $event, $message, array $context = array()) { $method = $this->getLogLevelMapping($event->getName()); if ($method !== false) { $context += array('command' => $event->getProcess()->getCommandLine()); $this->logger->{$method}($message, $context); } }