Skip to content

Commit 9c98217

Browse files
Fix tests
1 parent dc36d6c commit 9c98217

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ public static function provideSingleSubmitData(): iterable
9494

9595
yield 'string backed' => [
9696
Suit::class,
97-
Suit::Spades->value,
97+
(Suit::Spades)->value,
9898
Suit::Spades,
9999
];
100100

101101
yield 'integer backed' => [
102102
Number::class,
103-
(string) Number::Two->value,
103+
(string) (Number::Two)->value,
104104
Number::Two,
105105
];
106106
}
@@ -134,7 +134,7 @@ public function testSubmitNull($expected = null, $norm = null, $view = null)
134134

135135
public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = null)
136136
{
137-
$emptyData = Suit::Hearts->value;
137+
$emptyData = (Suit::Hearts)->value;
138138

139139
$form = $this->factory->create($this->getTestedType(), null, [
140140
'class' => Suit::class,
@@ -154,7 +154,7 @@ public function testSubmitMultipleChoiceWithEmptyData()
154154
'multiple' => true,
155155
'expanded' => false,
156156
'class' => Suit::class,
157-
'empty_data' => [Suit::Diamonds->value],
157+
'empty_data' => [(Suit::Diamonds)->value],
158158
]);
159159

160160
$form->submit(null);
@@ -168,7 +168,7 @@ public function testSubmitSingleChoiceExpandedWithEmptyData()
168168
'multiple' => false,
169169
'expanded' => true,
170170
'class' => Suit::class,
171-
'empty_data' => Suit::Hearts->value,
171+
'empty_data' => (Suit::Hearts)->value,
172172
]);
173173

174174
$form->submit(null);
@@ -182,7 +182,7 @@ public function testSubmitMultipleChoiceExpandedWithEmptyData()
182182
'multiple' => true,
183183
'expanded' => true,
184184
'class' => Suit::class,
185-
'empty_data' => [Suit::Spades->value],
185+
'empty_data' => [(Suit::Spades)->value],
186186
]);
187187

188188
$form->submit(null);
@@ -236,13 +236,13 @@ public static function provideMultiSubmitData(): iterable
236236

237237
yield 'string backed' => [
238238
Suit::class,
239-
[Suit::Hearts->value, Suit::Spades->value],
239+
[(Suit::Hearts)->value, (Suit::Spades)->value],
240240
[Suit::Hearts, Suit::Spades],
241241
];
242242

243243
yield 'integer backed' => [
244244
Number::class,
245-
[(string) Number::Two->value, (string) Number::Three->value],
245+
[(string) (Number::Two)->value, (string) (Number::Three)->value],
246246
[Number::Two, Number::Three],
247247
];
248248
}

0 commit comments

Comments
 (0)