function it_builds_a_form(FormBuilderInterface $builder, WorkflowInterface $workflow, StatusInterface $status) { $builder->add('name')->shouldBeCalled()->willReturn($builder); $workflow->getStatuses()->shouldBeCalled()->willReturn([$status]); $builder->add('state', 'Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType', ['class' => 'Kreta\\Component\\Workflow\\Model\\Status', 'choices' => [$status]])->shouldBeCalled()->willReturn($builder); $builder->add('initials', 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType', ['mapped' => false])->shouldBeCalled()->willReturn($builder); $this->buildForm($builder, ['workflow' => $workflow]); }
function it_builds_a_form(FormBuilderInterface $builder, WorkflowInterface $workflow, StatusInterface $status) { $builder->add('name')->shouldBeCalled()->willReturn($builder); $workflow->getStatuses()->shouldBeCalled()->willReturn([$status]); $builder->add('state', 'entity', ['class' => 'Kreta\\Component\\Workflow\\Model\\Status', 'choices' => [$status]])->shouldBeCalled()->willReturn($builder); $builder->add('initials', null, ['mapped' => false])->shouldBeCalled()->willReturn($builder); $this->buildForm($builder, ['workflow' => $workflow]); }