public function itDoesntChangeAnythingIfTemplateHasNoVariable() { $template_content = "this is some template content without variables"; $this->template->setContent($template_content); $processed = $this->template_processor->processTemplate($this->template, $this->project); $this->assertEqual($this->template->getContent(), $processed); }
/** * @param Git_Driver_Gerrit_Template_Template $template * @return bool */ public function updateTemplate(Git_Driver_Gerrit_Template_Template $template) { return $this->dao->updateTemplate($template->getId(), $template->getName(), $template->getContent()); }
public function processTemplate(Git_Driver_Gerrit_Template_Template $template, Project $project) { return str_replace(self::PROJECT_NAME_VARIABLE, $project->getUnixName(), $template->getContent()); }