/**
  * @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');
 }
Esempio n. 2
0
 /**
  * @param \FSi\Bundle\AdminBundle\Admin\CRUD\FormElement $element
  * @param \Symfony\Component\Form\FormFactory $formFactory
  */
 function it_mount_form_factory_to_elements_that_implements_form_element($element, $formFactory)
 {
     $element->setFormFactory($formFactory)->shouldBeCalled();
     $this->mount($element);
 }
 /**
  * @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');
 }