@@ -37,39 +37,39 @@ public function testDefaultFormatting(): void
37
37
38
38
public function testDefaultFormattingWithGrouping (): void
39
39
{
40
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'grouping ' => true ] );
40
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'grouping ' => true ) );
41
41
$ form ->setData ('12345.67890 ' );
42
42
43
43
$ this ->assertSame ('12.345,679 ' , $ form ->createView ()->vars ['value ' ]);
44
44
}
45
45
46
46
public function testDefaultFormattingWithScale (): void
47
47
{
48
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'scale ' => 2 ] );
48
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'scale ' => 2 ) );
49
49
$ form ->setData ('12345.67890 ' );
50
50
51
51
$ this ->assertSame ('12345,68 ' , $ form ->createView ()->vars ['value ' ]);
52
52
}
53
53
54
54
public function testDefaultFormattingWithScaleFloat (): void
55
55
{
56
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'scale ' => 2 ] );
56
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'scale ' => 2 ) );
57
57
$ form ->setData (12345.67890 );
58
58
59
59
$ this ->assertSame ('12345,68 ' , $ form ->createView ()->vars ['value ' ]);
60
60
}
61
61
62
62
public function testDefaultFormattingWithScaleAndStringInput (): void
63
63
{
64
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'scale ' => 2 , 'input ' => 'string ' ] );
64
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'scale ' => 2 , 'input ' => 'string ' ) );
65
65
$ form ->setData ('12345.67890 ' );
66
66
67
67
$ this ->assertSame ('12345,68 ' , $ form ->createView ()->vars ['value ' ]);
68
68
}
69
69
70
70
public function testDefaultFormattingWithRounding (): void
71
71
{
72
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'scale ' => 0 , 'rounding_mode ' => \NumberFormatter::ROUND_UP ] );
72
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'scale ' => 0 , 'rounding_mode ' => \NumberFormatter::ROUND_UP ) );
73
73
$ form ->setData ('12345.54321 ' );
74
74
75
75
$ this ->assertSame ('12346 ' , $ form ->createView ()->vars ['value ' ]);
@@ -94,7 +94,7 @@ public function testSubmitNullUsesDefaultEmptyData($emptyData = '10', $expectedD
94
94
95
95
public function testSubmitNumericInput (): void
96
96
{
97
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'input ' => 'number ' ] );
97
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'input ' => 'number ' ) );
98
98
$ form ->submit ('1,234 ' );
99
99
100
100
$ this ->assertSame (1.234 , $ form ->getData ());
@@ -104,7 +104,7 @@ public function testSubmitNumericInput(): void
104
104
105
105
public function testSubmitNumericInputWithScale (): void
106
106
{
107
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'input ' => 'number ' , 'scale ' => 2 ] );
107
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'input ' => 'number ' , 'scale ' => 2 ) );
108
108
$ form ->submit ('1,234 ' );
109
109
110
110
$ this ->assertSame (1.23 , $ form ->getData ());
@@ -114,7 +114,7 @@ public function testSubmitNumericInputWithScale(): void
114
114
115
115
public function testSubmitStringInput (): void
116
116
{
117
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'input ' => 'string ' ] );
117
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'input ' => 'string ' ) );
118
118
$ form ->submit ('1,234 ' );
119
119
120
120
$ this ->assertSame ('1.234 ' , $ form ->getData ());
@@ -124,7 +124,7 @@ public function testSubmitStringInput(): void
124
124
125
125
public function testSubmitStringInputWithScale (): void
126
126
{
127
- $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [ 'input ' => 'string ' , 'scale ' => 2 ] );
127
+ $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , array ( 'input ' => 'string ' , 'scale ' => 2 ) );
128
128
$ form ->submit ('1,234 ' );
129
129
130
130
$ this ->assertSame ('1.23 ' , $ form ->getData ());
0 commit comments