Example #1
0
 function it_creates_form(EventDispatcher $eventDispatcher, Form $form)
 {
     $eventDispatcher->dispatch(CreateFormEvent::NAME, Argument::type('Netzmacht\\Workflow\\Factory\\Event\\CreateFormEvent'))->will(function ($arguments) use($form) {
         /** @var CreateFormEvent $event */
         $event = $arguments[1];
         $event->setForm($form->getWrappedObject());
     });
     $this->createForm('form_type', 'form_name')->shouldReturn($form);
 }