function it_builds_form(FormBuilderInterface $builder, IdentifiableObjectRepositoryInterface $repository, DataTransformerInterface $transformer, $transformerFactory) { $options = ['repository' => $repository->getWrappedObject(), 'multiple' => false]; $transformerFactory->create($repository, ['multiple' => false])->willReturn($transformer); $builder->addViewTransformer($transformer, true)->shouldBeCalled(); $this->buildForm($builder, $options); }