/** * @test */ public function shouldReturnAllAddedTypes() { $types = [$type1 = uniqid('type') => uniqid('label'), $type2 = uniqid('type') => uniqid('label')]; $manager = new EmbeddedFormManager($this->createContainerMock(), $this->createFormFactoryMock()); $manager->addFormType($type1, $types[$type1]); $manager->addFormType($type2, $types[$type2]); $this->assertEquals($types, $manager->getAll()); }
/** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(['choices' => $this->manager->getAll()]); }