parent::
setUp();
$this->rawExtension =
new FormExtension();
$this->translatorExtension =
new FormExtension(new StubTranslator());
$data =
[ 'username' => 'tgalopin',
'choice_multiple' =>
['sugar', 'salt'
],
];
$form =
$this->factory->
createNamedBuilder('register', FormType::
class,
$data) ->
add('username', TextType::
class,
[ 'label' => 'base.username',
'label_translation_parameters' =>
['%label_brand%' => 'Symfony'
],
'help' => 'base.username_help',
'help_translation_parameters' =>
['%help_brand%' => 'Symfony'
],
'translation_domain' => 'forms',
]) ->
add('choice_flat', ChoiceType::
class,
[ 'choices' =>
[ 'base.yes' => 'yes',
'base.no' => 'no',
],