function let(TemplateFactory $templateFactory, Template $template)
 {
     $this->modelData = ['type' => 'test', 'headline' => serialize(['unit' => 'h1', 'value' => 'test']), 'id' => 1, 'customTpl' => 'custom_tpl'];
     $this->model = new Model($this->modelData);
     $templateFactory->createFrontendTemplate(Argument::cetera())->willReturn($template);
     $this->beAnInstanceOf('spec\\Netzmacht\\Contao\\Toolkit\\Component\\ContentElement\\ConcreteContentElement');
     $this->beConstructedWith($this->model, $templateFactory);
 }
 /**
  * {@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;
 }
 /**
  * Create a new template instance.
  *
  * @param string|null $name Custom template name. If null main wizard template is used.
  *
  * @return Template
  */
 protected function createTemplate($name = null)
 {
     return $this->templateFactory->createBackendTemplate($name ?: $this->template);
 }