spec\Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriberSpec::it_does_not_replace_user_form_by_new_user_form_when_create_user_check_is_checked PHP Метод

it_does_not_replace_user_form_by_new_user_form_when_create_user_check_is_checked() публичный Метод

public it_does_not_replace_user_form_by_new_user_form_when_create_user_check_is_checked ( Symfony\Component\Form\FormEvent $event, Form $form, Form $createUserCheckForm, Sylius\Component\User\Model\UserAwareInterface $customer )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\Form
$createUserCheckForm Symfony\Component\Form\Form
$customer Sylius\Component\User\Model\UserAwareInterface
    function it_does_not_replace_user_form_by_new_user_form_when_create_user_check_is_checked(FormEvent $event, Form $form, Form $createUserCheckForm, UserAwareInterface $customer)
    {
        $event->getData()->willReturn($customer);
        $event->getForm()->willReturn($form);
        $form->get('createUser')->willReturn($createUserCheckForm);
        $createUserCheckForm->getViewData()->willReturn('1');
        $customer->setUser(null)->shouldNotBeCalled();
        $event->setData($customer)->shouldNotBeCalled();
        $form->remove('user')->shouldNotBeCalled();
        $form->add('user', '\\Fully\\Qualified\\ClassName', Argument::type('array'))->shouldNotBeCalled();
        $this->submit($event);
    }