Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 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());
 }