/** * @param \FSi\Bundle\AdminBundle\Admin\CRUD\FormElement $element */ function it_has_template($element) { $element->hasOption('template_form')->willReturn(true); $element->getOption('template_form')->willReturn('this_is_form_template.html.twig'); $this->hasTemplateName()->shouldReturn(true); $this->getTemplateName()->shouldReturn('this_is_form_template.html.twig'); }
/** * @param \FSi\Bundle\AdminBundle\Admin\CRUD\FormElement $element */ function it_return_default_template_if_no_option($element) { $element->hasOption('template_form')->willReturn(false); $this->hasTemplateName()->shouldReturn(true); $this->getTemplateName()->shouldReturn('some_template.html.twig'); }