spec\Sylius\Bundle\ApiBundle\Form\EventSubscriber\AddUserFormSubscriberSpec::it_removes_user_form_type_by_default PHP Метод

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

public it_removes_user_form_type_by_default ( Symfony\Component\Form\FormEvent $event, Form $form, Sylius\Component\User\Model\UserAwareInterface $customer )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\Form
$customer Sylius\Component\User\Model\UserAwareInterface
    function it_removes_user_form_type_by_default(FormEvent $event, Form $form, UserAwareInterface $customer)
    {
        $event->getData()->willReturn([], ['user' => ['plainPassword' => '']]);
        $event->getForm()->willReturn($form);
        $form->getNormData()->willReturn($customer);
        $customer->getUser()->willReturn(null);
        $event->setData([])->shouldBeCalledTimes(1);
        $form->remove('user')->shouldBeCalledTimes(2);
        $this->preSubmit($event);
        $this->preSubmit($event);
    }