spec\Sylius\Bundle\ResourceBundle\Form\EventSubscriber\AddCodeFormSubscriberSpec::it_adds_code_with_specified_type_and_label PHP Метод

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

public it_adds_code_with_specified_type_and_label ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface
    function it_adds_code_with_specified_type_and_label(FormEvent $event, FormInterface $form, CodeAwareInterface $resource)
    {
        $this->beConstructedWith(FormType::class, ['label' => 'sylius.ui.name']);
        $event->getData()->willReturn($resource);
        $event->getForm()->willReturn($form);
        $resource->getCode()->willReturn('Code12');
        $form->add('code', FormType::class, Argument::withEntry('label', 'sylius.ui.name'))->shouldBeCalled();
        $this->preSetData($event);
    }