registerTemplate() public method

Registers a template.
public registerTemplate ( Gush\Template\TemplateInterface $template )
$template Gush\Template\TemplateInterface
Example #1
0
 /**
  * @test
  */
 public function binds_and_renders()
 {
     $this->input->setOption('test-option', 'test-option');
     $this->template->getName()->willReturn('test/foobar')->shouldBeCalled();
     $this->template->bind(['author' => 'cslucano'])->shouldBeCalled();
     $this->template->render()->willReturn('foo')->shouldBeCalled();
     $this->helper->registerTemplate($this->template->reveal());
     $res = $this->helper->bindAndRender(['author' => 'cslucano'], 'test', 'foobar');
     $this->assertEquals('foo', $res);
 }