public function testCreateNamed() { $form =
$this->factory->
createNamed('name', ConfigurableFormType::
class, null,
['a' => '1', 'b' => '2'
]);
$this->
assertSame('1',
$form->
getConfig()->
getOption('a'
));
$this->
assertSame('2',
$form->
getConfig()->
getOption('b'
));
} public function testCreateBuilderForPropertyWithoutTypeGuesser() { $builder =
$this->factory->
createBuilderForProperty('Application\Author', 'firstName'
);
$this->
assertSame('firstName',
$builder->
getName());
} public function testCreateBuilderForPropertyCreatesFormWithHighestConfidence() { $this->guesser1->
configureTypeGuess(TextType::
class,
['attr' =>
['maxlength' => 10
]], Guess::MEDIUM_CONFIDENCE
);
$this->guesser2->
configureTypeGuess(PasswordType::
class,
['attr' =>
['maxlength' => 7
]], Guess::HIGH_CONFIDENCE
);
$builder =
$this->factory->
createBuilderForProperty('Application\Author', 'firstName'
);