public function testConfigureOptions() { $resolver = $this->createOptionsResolverMock(); $resolver->expects($this->never())->method('setDefined'); $resolver->expects($this->never())->method('setDefault'); $resolver->expects($this->never())->method('setDefaults'); $this->type->configureOptions($resolver); }
/** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setDefaults(['route_parameters' => [], 'route_reference_type' => UrlGeneratorInterface::ABSOLUTE_PATH])->setRequired('route')->setAllowedTypes('route', 'string')->setAllowedTypes('route_parameters', 'array')->setAllowedValues('route_reference_type', [UrlGeneratorInterface::ABSOLUTE_PATH, UrlGeneratorInterface::ABSOLUTE_URL, UrlGeneratorInterface::NETWORK_PATH, UrlGeneratorInterface::RELATIVE_PATH]); }