private ConfigurableFormTypeGuesser
$guesser1;
private ConfigurableFormTypeGuesser
$guesser2;
private FormRegistry
$registry;
private FormFactory
$factory;
protected function setUp(): void
{ $this->guesser1 =
new ConfigurableFormTypeGuesser();
$this->guesser2 =
new ConfigurableFormTypeGuesser();
$this->registry =
new FormRegistry([ new PreloadedExtension([ new ConfigurableFormType(),
],
[],
new FormTypeGuesserChain([$this->guesser1,
$this->guesser2
])),
],
new ResolvedFormTypeFactory());
$this->factory =
new FormFactory($this->registry
);
} public function testCreateNamedBuilderWithTypeName() { $builder =
$this->factory->
createNamedBuilder('name', ConfigurableFormType::
class, null,
['a' => '1', 'b' => '2'
]);
$this->
assertSame('1',
$builder->
getOption('a'
));