예제 #1
0
 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);
 }
예제 #2
0
 /**
  * @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());
 }