@@ -29,43 +29,67 @@ public static function provideAcceptsValues(): Generator
29
29
'actualValue ' => 123 ,
30
30
];
31
31
32
- yield 'Expects Int64, Actual string ' => [
32
+ yield 'Expects Int64, Actual int string ' => [
33
33
'expectedResult ' => true ,
34
34
'expectedValue ' => new Int64 (123 ),
35
35
'actualValue ' => '123 ' ,
36
36
];
37
37
38
38
yield 'Expects Int64, Actual float ' => [
39
- 'expectedResult ' => false ,
39
+ 'expectedResult ' => true ,
40
40
'expectedValue ' => new Int64 (123 ),
41
41
'actualValue ' => 123.0 ,
42
42
];
43
43
44
+ yield 'Expects Int64, Actual float string ' => [
45
+ 'expectedResult ' => true ,
46
+ 'expectedValue ' => new Int64 (123 ),
47
+ 'actualValue ' => '123.0 ' ,
48
+ ];
49
+
50
+ yield 'Expects Int64, Actual non-numeric string ' => [
51
+ 'expectedResult ' => false ,
52
+ 'expectedValue ' => new Int64 (123 ),
53
+ 'actualValue ' => 'foo ' ,
54
+ ];
55
+
44
56
yield 'Expects int, Actual Int64 ' => [
45
57
'expectedResult ' => true ,
46
58
'expectedValue ' => 123 ,
47
59
'actualValue ' => new Int64 (123 ),
48
60
];
49
61
50
- yield 'Expects string, Actual Int64 ' => [
62
+ yield 'Expects int string, Actual Int64 ' => [
51
63
'expectedResult ' => true ,
52
64
'expectedValue ' => '123 ' ,
53
65
'actualValue ' => new Int64 (123 ),
54
66
];
55
67
56
68
yield 'Expects float, Actual Int64 ' => [
57
- 'expectedResult ' => false ,
69
+ 'expectedResult ' => true ,
58
70
'expectedValue ' => 123.0 ,
59
71
'actualValue ' => new Int64 (123 ),
60
72
];
61
73
74
+ yield 'Expects float string, Actual Int64 ' => [
75
+ 'expectedResult ' => true ,
76
+ 'expectedValue ' => '123.0 ' ,
77
+ 'actualValue ' => new Int64 (123 ),
78
+ ];
79
+
80
+ yield 'Expects non-numeric string, Actual Int64 ' => [
81
+ 'expectedResult ' => false ,
82
+ 'expectedValue ' => 'foo ' ,
83
+ 'actualValue ' => new Int64 (123 ),
84
+ ];
85
+
62
86
yield 'Expects float, Actual Float ' => [
63
87
'expectedResult ' => false ,
64
88
'expectedValue ' => 123.0 ,
65
89
'actualValue ' => 123.0 ,
66
90
];
67
91
68
- yield 'Expects string, Actual string ' => [
92
+ yield 'Expects numeric string, Actual numeric string ' => [
69
93
'expectedResult ' => false ,
70
94
'expectedValue ' => '123 ' ,
71
95
'actualValue ' => '123 ' ,
@@ -84,28 +108,48 @@ public function testMatchingAssertions($expected, $actual): void
84
108
public static function provideMatchingAssertions (): Generator
85
109
{
86
110
yield 'Expected Int64, Actual Int64 ' => [
87
- 'expected ' => new Int64 (123 ),
88
- 'actual ' => new Int64 (123 ),
111
+ 'expected ' => new Int64 (8589934592 ),
112
+ 'actual ' => new Int64 (8589934592 ),
89
113
];
90
114
91
115
yield 'Expected Int64, Actual int ' => [
92
- 'expected ' => new Int64 (123 ),
93
- 'actual ' => 123 ,
116
+ 'expected ' => new Int64 (8589934592 ),
117
+ 'actual ' => 8589934592 ,
118
+ ];
119
+
120
+ yield 'Expected Int64, Actual int string ' => [
121
+ 'expected ' => new Int64 (8589934592 ),
122
+ 'actual ' => '8589934592 ' ,
123
+ ];
124
+
125
+ yield 'Expected Int64, Actual float ' => [
126
+ 'expected ' => new Int64 (8589934592 ),
127
+ 'actual ' => 8589934592.0 ,
94
128
];
95
129
96
- yield 'Expected Int64, Actual string ' => [
97
- 'expected ' => new Int64 (123 ),
98
- 'actual ' => '123 ' ,
130
+ yield 'Expected Int64, Actual float string ' => [
131
+ 'expected ' => new Int64 (8589934592 ),
132
+ 'actual ' => '8589934592.0 ' ,
99
133
];
100
134
101
135
yield 'Expected int, Actual Int64 ' => [
102
- 'expected ' => 123 ,
103
- 'actual ' => new Int64 (123 ),
136
+ 'expected ' => 8589934592 ,
137
+ 'actual ' => new Int64 (8589934592 ),
104
138
];
105
139
106
- yield 'Expected string, Actual Int64 ' => [
107
- 'expected ' => '123 ' ,
108
- 'actual ' => new Int64 (123 ),
140
+ yield 'Expected int string, Actual Int64 ' => [
141
+ 'expected ' => '8589934592 ' ,
142
+ 'actual ' => new Int64 (8589934592 ),
143
+ ];
144
+
145
+ yield 'Expected float, Actual Int64 ' => [
146
+ 'expected ' => 8589934592.0 ,
147
+ 'actual ' => new Int64 (8589934592 ),
148
+ ];
149
+
150
+ yield 'Expected float string, Actual Int64 ' => [
151
+ 'expected ' => '8589934592.0 ' ,
152
+ 'actual ' => new Int64 (8589934592 ),
109
153
];
110
154
}
111
155
@@ -120,27 +164,47 @@ public function testFailingAssertions($expected, $actual): void
120
164
public static function provideFailingValues (): Generator
121
165
{
122
166
yield 'Expected Int64, Actual Int64 ' => [
123
- 'expected ' => new Int64 (123 ),
167
+ 'expected ' => new Int64 (8589934592 ),
124
168
'actual ' => new Int64 (456 ),
125
169
];
126
170
127
171
yield 'Expected Int64, Actual int ' => [
128
- 'expected ' => new Int64 (123 ),
172
+ 'expected ' => new Int64 (8589934592 ),
129
173
'actual ' => 456 ,
130
174
];
131
175
132
- yield 'Expected Int64, Actual string ' => [
133
- 'expected ' => new Int64 (123 ),
176
+ yield 'Expected Int64, Actual int string ' => [
177
+ 'expected ' => new Int64 (8589934592 ),
134
178
'actual ' => '456 ' ,
135
179
];
136
180
181
+ yield 'Expected Int64, Actual float ' => [
182
+ 'expected ' => new Int64 (8589934592 ),
183
+ 'actual ' => 8589934592.1 ,
184
+ ];
185
+
186
+ yield 'Expected Int64, Actual float string ' => [
187
+ 'expected ' => new Int64 (8589934592 ),
188
+ 'actual ' => '8589934592.1 ' ,
189
+ ];
190
+
137
191
yield 'Expected int, Actual Int64 ' => [
138
- 'expected ' => 123 ,
192
+ 'expected ' => 8589934592 ,
193
+ 'actual ' => new Int64 (456 ),
194
+ ];
195
+
196
+ yield 'Expected int string, Actual Int64 ' => [
197
+ 'expected ' => '8589934592 ' ,
198
+ 'actual ' => new Int64 (456 ),
199
+ ];
200
+
201
+ yield 'Expected float, Actual Int64 ' => [
202
+ 'expected ' => 8589934592.1 ,
139
203
'actual ' => new Int64 (456 ),
140
204
];
141
205
142
- yield 'Expected string, Actual Int64 ' => [
143
- 'expected ' => '123 ' ,
206
+ yield 'Expected float string, Actual Int64 ' => [
207
+ 'expected ' => '8589934592.1 ' ,
144
208
'actual ' => new Int64 (456 ),
145
209
];
146
210
}
0 commit comments