Skip to content

Commit 9a51e82

Browse files
committed
Remove :void in test function signatures
1 parent 97de93d commit 9a51e82

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public function testTransform($from, $to): void
3737
$this->assertSame($to, $transformer->transform($from));
3838
}
3939

40-
public function testFailIfTransformingANonString(): void
40+
public function testFailIfTransformingANonString()
4141
{
4242
$this->expectException('Symfony\Component\Form\Exception\TransformationFailedException');
4343
$transformer = new StringToFloatTransformer();
4444
$transformer->transform(1.0);
4545
}
4646

47-
public function testFailIfTransformingANonNumericString(): void
47+
public function testFailIfTransformingANonNumericString()
4848
{
4949
$this->expectException('Symfony\Component\Form\Exception\TransformationFailedException');
5050
$transformer = new StringToFloatTransformer();
@@ -77,7 +77,7 @@ public function testReverseTransform($from, $to, int $scale = null): void
7777
$this->assertSame($to, $transformer->reverseTransform($from));
7878
}
7979

80-
public function testFailIfReverseTransformingANonNumeric(): void
80+
public function testFailIfReverseTransformingANonNumeric()
8181
{
8282
$this->expectException('Symfony\Component\Form\Exception\TransformationFailedException');
8383
$transformer = new StringToFloatTransformer();

Tests/Extension/Core/Type/DateTimeTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ public function provideEmptyData()
729729
];
730730
}
731731

732-
public function testSubmitStringWithCustomInputFormat(): void
732+
public function testSubmitStringWithCustomInputFormat()
733733
{
734734
$form = $this->factory->create(static::TESTED_TYPE, null, [
735735
'model_timezone' => 'UTC',

Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ public function provideEmptyData()
10481048
];
10491049
}
10501050

1051-
public function testSubmitStringWithCustomInputFormat(): void
1051+
public function testSubmitStringWithCustomInputFormat()
10521052
{
10531053
$form = $this->factory->create(static::TESTED_TYPE, null, [
10541054
'model_timezone' => 'UTC',

Tests/Extension/Core/Type/NumberTypeTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,39 @@ protected function tearDown(): void
3737
\Locale::setDefault($this->defaultLocale);
3838
}
3939

40-
public function testDefaultFormatting(): void
40+
public function testDefaultFormatting()
4141
{
4242
$form = $this->factory->create(static::TESTED_TYPE);
4343
$form->setData('12345.67890');
4444

4545
$this->assertSame('12345,679', $form->createView()->vars['value']);
4646
}
4747

48-
public function testDefaultFormattingWithGrouping(): void
48+
public function testDefaultFormattingWithGrouping()
4949
{
5050
$form = $this->factory->create(static::TESTED_TYPE, null, ['grouping' => true]);
5151
$form->setData('12345.67890');
5252

5353
$this->assertSame('12.345,679', $form->createView()->vars['value']);
5454
}
5555

56-
public function testDefaultFormattingWithScale(): void
56+
public function testDefaultFormattingWithScale()
5757
{
5858
$form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 2]);
5959
$form->setData('12345.67890');
6060

6161
$this->assertSame('12345,68', $form->createView()->vars['value']);
6262
}
6363

64-
public function testDefaultFormattingWithScaleFloat(): void
64+
public function testDefaultFormattingWithScaleFloat()
6565
{
6666
$form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 2]);
6767
$form->setData(12345.67890);
6868

6969
$this->assertSame('12345,68', $form->createView()->vars['value']);
7070
}
7171

72-
public function testDefaultFormattingWithScaleAndStringInput(): void
72+
public function testDefaultFormattingWithScaleAndStringInput()
7373
{
7474
$form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 2, 'input' => 'string']);
7575
$form->setData('12345.67890');
@@ -81,7 +81,7 @@ public function testDefaultFormattingWithScaleAndStringInput(): void
8181
* @group legacy
8282
* @expectedDeprecation Using the Symfony\Component\Form\Extension\Core\Type\NumberType with float or int data when the "input" option is set to "string" is deprecated since Symfony 4.4 and will throw an exception in 5.0.
8383
*/
84-
public function testStringInputWithFloatData(): void
84+
public function testStringInputWithFloatData()
8585
{
8686
$form = $this->factory->create(static::TESTED_TYPE, 12345.6789, [
8787
'input' => 'string',
@@ -95,7 +95,7 @@ public function testStringInputWithFloatData(): void
9595
* @group legacy
9696
* @expectedDeprecation Using the Symfony\Component\Form\Extension\Core\Type\NumberType with float or int data when the "input" option is set to "string" is deprecated since Symfony 4.4 and will throw an exception in 5.0.
9797
*/
98-
public function testStringInputWithIntData(): void
98+
public function testStringInputWithIntData()
9999
{
100100
$form = $this->factory->create(static::TESTED_TYPE, 12345, [
101101
'input' => 'string',
@@ -105,7 +105,7 @@ public function testStringInputWithIntData(): void
105105
$this->assertSame('12345,00', $form->createView()->vars['value']);
106106
}
107107

108-
public function testDefaultFormattingWithRounding(): void
108+
public function testDefaultFormattingWithRounding()
109109
{
110110
$form = $this->factory->create(static::TESTED_TYPE, null, ['scale' => 0, 'rounding_mode' => \NumberFormatter::ROUND_UP]);
111111
$form->setData('12345.54321');
@@ -145,7 +145,7 @@ public function testSubmitNullWithEmptyDataSetToNull()
145145
$this->assertNull($form->getData());
146146
}
147147

148-
public function testSubmitNumericInput(): void
148+
public function testSubmitNumericInput()
149149
{
150150
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'number']);
151151
$form->submit('1,234');
@@ -155,7 +155,7 @@ public function testSubmitNumericInput(): void
155155
$this->assertSame('1,234', $form->getViewData());
156156
}
157157

158-
public function testSubmitNumericInputWithScale(): void
158+
public function testSubmitNumericInputWithScale()
159159
{
160160
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'number', 'scale' => 2]);
161161
$form->submit('1,234');
@@ -165,7 +165,7 @@ public function testSubmitNumericInputWithScale(): void
165165
$this->assertSame('1,23', $form->getViewData());
166166
}
167167

168-
public function testSubmitStringInput(): void
168+
public function testSubmitStringInput()
169169
{
170170
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'string']);
171171
$form->submit('1,234');
@@ -175,7 +175,7 @@ public function testSubmitStringInput(): void
175175
$this->assertSame('1,234', $form->getViewData());
176176
}
177177

178-
public function testSubmitStringInputWithScale(): void
178+
public function testSubmitStringInputWithScale()
179179
{
180180
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'string', 'scale' => 2]);
181181
$form->submit('1,234');

0 commit comments

Comments
 (0)