function it_generates_output(Template $template) { $template->set(Argument::type('string'), Argument::any())->shouldBeCalled(); $template->parse()->willReturn('output'); $this->generate()->shouldBeString(); $this->generate()->shouldReturn('output'); }
/** * {@inheritDoc} */ public function generate() { $this->preGenerate(); $this->template = $this->templateFactory->createFrontendTemplate($this->getTemplateName(), $this->getData()); $this->prepareTemplate($this->template); $this->compile(); $buffer = $this->template->parse(); $buffer = $this->postGenerate($buffer); return $buffer; }