Skip to content

Commit 4c8336b

Browse files
committed
Add select multiple to backend form test
1 parent d00cb41 commit 4c8336b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/LiveComponent/tests/Fixtures/Form/FormType1.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public function buildForm(FormBuilderInterface $builder, array $options)
5757
'multiple' => true,
5858
'data' => [2],
5959
])
60+
->add('select_multiple', ChoiceType::class, [
61+
'choices' => [
62+
'foo' => 1,
63+
'bar' => 2,
64+
],
65+
'multiple' => true,
66+
'data' => [2],
67+
])
6068
->add('checkbox', CheckboxType::class)
6169
->add('checkbox_checked', CheckboxType::class, [
6270
'data' => true,

src/LiveComponent/tests/Unit/Form/ComponentWithFormTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function testFormValues(): void
3535
'choice' => '',
3636
'choice_expanded' => '',
3737
'choice_multiple' => ['2'],
38+
'select_multiple' => ['2'],
3839
'checkbox' => null,
3940
'checkbox_checked' => '1',
4041
'file' => '',

0 commit comments

Comments
 (0)