@@ -28,22 +28,20 @@ public function testCoverage()
28
28
]);
29
29
30
30
$ xmlReport ->method ('getErrorsOnLine ' )
31
- ->will (
32
- $ this ->returnCallback (
33
- function () {
34
- $ file = func_get_arg (0 );
35
- $ line = func_get_arg (1 );
36
-
37
- if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
38
- return $ this ->errorMessage ;
39
- }
40
- if ($ file == '/full/path/to/testFile2.php ' && $ line == 4 ) {
41
- return $ this ->errorMessage ;
42
- }
43
-
44
- return [];
31
+ ->willReturnCallback (
32
+ function () {
33
+ $ file = func_get_arg (0 );
34
+ $ line = func_get_arg (1 );
35
+
36
+ if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
37
+ return $ this ->errorMessage ;
38
+ }
39
+ if ($ file == '/full/path/to/testFile2.php ' && $ line == 4 ) {
40
+ return $ this ->errorMessage ;
45
41
}
46
- )
42
+
43
+ return [];
44
+ }
47
45
);
48
46
49
47
$ matcher = new FileMatchers \EndsWith ;
@@ -87,19 +85,17 @@ public function testCoverageFailed()
87
85
->willReturn (null );
88
86
89
87
$ xmlReport ->method ('getErrorsOnLine ' )
90
- ->will (
91
- $ this ->returnCallback (
92
- function () {
93
- $ file = func_get_arg (0 );
94
- $ line = func_get_arg (1 );
88
+ ->willReturnCallback (
89
+ function () {
90
+ $ file = func_get_arg (0 );
91
+ $ line = func_get_arg (1 );
95
92
96
- if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
97
- return $ this ->errorMessage ;
98
- }
99
-
100
- return [];
93
+ if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
94
+ return $ this ->errorMessage ;
101
95
}
102
- )
96
+
97
+ return [];
98
+ }
103
99
);
104
100
105
101
$ matcher = new FileMatchers \EndsWith ;
@@ -141,19 +137,17 @@ public function testAddingAllUnknownsCovered()
141
137
->willReturn (true );
142
138
143
139
$ xmlReport ->method ('getErrorsOnLine ' )
144
- ->will (
145
- $ this ->returnCallback (
146
- function () {
147
- $ file = func_get_arg (0 );
148
- $ line = func_get_arg (1 );
149
-
150
- if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
151
- return $ this ->errorMessage ;
152
- }
140
+ ->willReturnCallback (
141
+ function () {
142
+ $ file = func_get_arg (0 );
143
+ $ line = func_get_arg (1 );
153
144
154
- return [];
145
+ if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
146
+ return $ this ->errorMessage ;
155
147
}
156
- )
148
+
149
+ return [];
150
+ }
157
151
);
158
152
159
153
$ matcher = new FileMatchers \EndsWith ;
@@ -196,19 +190,17 @@ public function testAddingAllUnknownsUnCovered()
196
190
->willReturn (false );
197
191
198
192
$ xmlReport ->method ('getErrorsOnLine ' )
199
- ->will (
200
- $ this ->returnCallback (
201
- function () {
202
- $ file = func_get_arg (0 );
203
- $ line = func_get_arg (1 );
204
-
205
- if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
206
- return $ this ->errorMessage ;
207
- }
193
+ ->willReturnCallback (
194
+ function () {
195
+ $ file = func_get_arg (0 );
196
+ $ line = func_get_arg (1 );
208
197
209
- return [];
198
+ if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
199
+ return $ this ->errorMessage ;
210
200
}
211
- )
201
+
202
+ return [];
203
+ }
212
204
);
213
205
214
206
$ matcher = new FileMatchers \EndsWith ;
@@ -254,19 +246,17 @@ public function testCoverageForContextLines()
254
246
->willReturn (false );
255
247
256
248
$ xmlReport ->method ('getErrorsOnLine ' )
257
- ->will (
258
- $ this ->returnCallback (
259
- function () {
260
- $ file = func_get_arg (0 );
261
- $ line = func_get_arg (1 );
249
+ ->willReturnCallback (
250
+ function () {
251
+ $ file = func_get_arg (0 );
252
+ $ line = func_get_arg (1 );
262
253
263
- if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
264
- return null ;
265
- }
266
-
267
- return [];
254
+ if ($ file == '/full/path/to/testFile1.php ' && $ line == 2 ) {
255
+ return null ;
268
256
}
269
- )
257
+
258
+ return [];
259
+ }
270
260
);
271
261
272
262
$ matcher = new FileMatchers \EndsWith ;
0 commit comments