/** * get output test */ public function testGetOutput() { $binary = new GitBinary(); $caller = new Caller($binary, $this->getRepository()->getPath()); $mainCommand = new MainCommand(); $caller->execute($mainCommand->init()); $this->assertRegExp(sprintf('/^(.*)%s/', str_replace('/', '\\/', $this->getRepository()->getPath())), $caller->getOutput()); }
/** * Check if this is a bare repository * @return boolean */ public function isBare() { $options = array(RevParseCommand::OPTION_IS_BARE_REPOSIORY); $this->caller->execute(RevParseCommand::getInstance()->revParse(null, $options)); return trim($this->caller->getOutput()) === 'true'; }