/** * Builds a new Replace template * * @param String $template The template string that will be rendered * @return \r8\Template\Replace */ public function replace($template) { $tpl = new \r8\Template\Replace($template); $tpl->import($this->getValues()); return $tpl; }
public function testDisplay() { $this->expectOutputString("The quick fox ran"); $tpl = new \r8\Template\Replace("The #{adjective} #{noun} #{verb}"); $tpl->import(array("adjective" => "quick", "noun" => "fox", "verb" => "ran")); $this->assertSame($tpl, $tpl->display()); }