Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13a3a26

Browse files
peter-gribanovPeter Gribanov
authored and
Peter Gribanov
committed
fix tests
1 parent 86630df commit 13a3a26

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionFieldHelpersTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ protected function setUp(): void
5656

5757
$form = $this->factory->createNamedBuilder('register', FormType::class, $data)
5858
->add('username', TextType::class, [
59+
'empty_data' => null,
5960
'label' => 'base.username',
6061
'label_translation_parameters' => ['%label_brand%' => 'Symfony'],
6162
'help' => 'base.username_help',

src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ public function __construct(RequestStack $requestStack)
4242
public function buildForm(FormBuilderInterface $builder, array $options)
4343
{
4444
$builder
45-
->add('username', 'Symfony\Component\Form\Extension\Core\Type\TextType')
46-
->add('password', 'Symfony\Component\Form\Extension\Core\Type\PasswordType')
45+
->add('username', 'Symfony\Component\Form\Extension\Core\Type\TextType', [
46+
'empty_data' => null,
47+
])
48+
->add('password', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', [
49+
'empty_data' => null,
50+
])
4751
->add('_target_path', 'Symfony\Component\Form\Extension\Core\Type\HiddenType')
4852
;
4953

0 commit comments

Comments
 (0)