@@ -72,7 +72,7 @@ public function testForwardCallToRead()
72
72
$ this ->readerImpl ->expects ($ this ->once ())
73
73
->method ('read ' )
74
74
->with (self ::RES_DIR , 'root ' )
75
- ->will ( $ this -> returnValue ( self ::$ data) );
75
+ ->willReturn ( self ::$ data );
76
76
77
77
$ this ->assertSame (self ::$ data , $ this ->reader ->read (self ::RES_DIR , 'root ' ));
78
78
}
@@ -82,12 +82,12 @@ public function testReadEntireDataFileIfNoIndicesGiven()
82
82
$ this ->readerImpl ->expects ($ this ->at (0 ))
83
83
->method ('read ' )
84
84
->with (self ::RES_DIR , 'en ' )
85
- ->will ( $ this -> returnValue ( self ::$ data) );
85
+ ->willReturn ( self ::$ data );
86
86
87
87
$ this ->readerImpl ->expects ($ this ->at (1 ))
88
88
->method ('read ' )
89
89
->with (self ::RES_DIR , 'root ' )
90
- ->will ( $ this -> returnValue ( self ::$ fallbackData) );
90
+ ->willReturn ( self ::$ fallbackData );
91
91
92
92
$ this ->assertSame (self ::$ mergedData , $ this ->reader ->readEntry (self ::RES_DIR , 'en ' , []));
93
93
}
@@ -97,7 +97,7 @@ public function testReadExistingEntry()
97
97
$ this ->readerImpl ->expects ($ this ->once ())
98
98
->method ('read ' )
99
99
->with (self ::RES_DIR , 'root ' )
100
- ->will ( $ this -> returnValue ( self ::$ data) );
100
+ ->willReturn ( self ::$ data );
101
101
102
102
$ this ->assertSame ('Bar ' , $ this ->reader ->readEntry (self ::RES_DIR , 'root ' , ['Entries ' , 'Foo ' ]));
103
103
}
@@ -110,7 +110,7 @@ public function testReadNonExistingEntry()
110
110
$ this ->readerImpl ->expects ($ this ->once ())
111
111
->method ('read ' )
112
112
->with (self ::RES_DIR , 'root ' )
113
- ->will ( $ this -> returnValue ( self ::$ data) );
113
+ ->willReturn ( self ::$ data );
114
114
115
115
$ this ->reader ->readEntry (self ::RES_DIR , 'root ' , ['Entries ' , 'NonExisting ' ]);
116
116
}
@@ -120,12 +120,12 @@ public function testFallbackIfEntryDoesNotExist()
120
120
$ this ->readerImpl ->expects ($ this ->at (0 ))
121
121
->method ('read ' )
122
122
->with (self ::RES_DIR , 'en_GB ' )
123
- ->will ( $ this -> returnValue ( self ::$ data) );
123
+ ->willReturn ( self ::$ data );
124
124
125
125
$ this ->readerImpl ->expects ($ this ->at (1 ))
126
126
->method ('read ' )
127
127
->with (self ::RES_DIR , 'en ' )
128
- ->will ( $ this -> returnValue ( self ::$ fallbackData) );
128
+ ->willReturn ( self ::$ fallbackData );
129
129
130
130
$ this ->assertSame ('Lah ' , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Entries ' , 'Bam ' ]));
131
131
}
@@ -138,7 +138,7 @@ public function testDontFallbackIfEntryDoesNotExistAndFallbackDisabled()
138
138
$ this ->readerImpl ->expects ($ this ->once ())
139
139
->method ('read ' )
140
140
->with (self ::RES_DIR , 'en_GB ' )
141
- ->will ( $ this -> returnValue ( self ::$ data) );
141
+ ->willReturn ( self ::$ data );
142
142
143
143
$ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Entries ' , 'Bam ' ], false );
144
144
}
@@ -153,7 +153,7 @@ public function testFallbackIfLocaleDoesNotExist()
153
153
$ this ->readerImpl ->expects ($ this ->at (1 ))
154
154
->method ('read ' )
155
155
->with (self ::RES_DIR , 'en ' )
156
- ->will ( $ this -> returnValue ( self ::$ fallbackData) );
156
+ ->willReturn ( self ::$ fallbackData );
157
157
158
158
$ this ->assertSame ('Lah ' , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Entries ' , 'Bam ' ]));
159
159
}
@@ -193,17 +193,17 @@ public function testMergeDataWithFallbackData($childData, $parentData, $result)
193
193
$ this ->readerImpl ->expects ($ this ->at (0 ))
194
194
->method ('read ' )
195
195
->with (self ::RES_DIR , 'en ' )
196
- ->will ( $ this -> returnValue ( $ childData) );
196
+ ->willReturn ( $ childData );
197
197
198
198
$ this ->readerImpl ->expects ($ this ->at (1 ))
199
199
->method ('read ' )
200
200
->with (self ::RES_DIR , 'root ' )
201
- ->will ( $ this -> returnValue ( $ parentData) );
201
+ ->willReturn ( $ parentData );
202
202
} else {
203
203
$ this ->readerImpl ->expects ($ this ->once ())
204
204
->method ('read ' )
205
205
->with (self ::RES_DIR , 'en ' )
206
- ->will ( $ this -> returnValue ( $ childData) );
206
+ ->willReturn ( $ childData );
207
207
}
208
208
209
209
$ this ->assertSame ($ result , $ this ->reader ->readEntry (self ::RES_DIR , 'en ' , [], true ));
@@ -217,7 +217,7 @@ public function testDontMergeDataIfFallbackDisabled($childData, $parentData, $re
217
217
$ this ->readerImpl ->expects ($ this ->once ())
218
218
->method ('read ' )
219
219
->with (self ::RES_DIR , 'en_GB ' )
220
- ->will ( $ this -> returnValue ( $ childData) );
220
+ ->willReturn ( $ childData );
221
221
222
222
$ this ->assertSame ($ childData , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , [], false ));
223
223
}
@@ -231,17 +231,17 @@ public function testMergeExistingEntryWithExistingFallbackEntry($childData, $par
231
231
$ this ->readerImpl ->expects ($ this ->at (0 ))
232
232
->method ('read ' )
233
233
->with (self ::RES_DIR , 'en ' )
234
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
234
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
235
235
236
236
$ this ->readerImpl ->expects ($ this ->at (1 ))
237
237
->method ('read ' )
238
238
->with (self ::RES_DIR , 'root ' )
239
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ parentData ]]) );
239
+ ->willReturn ( ['Foo ' => ['Bar ' => $ parentData ]]);
240
240
} else {
241
241
$ this ->readerImpl ->expects ($ this ->once ())
242
242
->method ('read ' )
243
243
->with (self ::RES_DIR , 'en ' )
244
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
244
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
245
245
}
246
246
247
247
$ this ->assertSame ($ result , $ this ->reader ->readEntry (self ::RES_DIR , 'en ' , ['Foo ' , 'Bar ' ], true ));
@@ -255,12 +255,12 @@ public function testMergeNonExistingEntryWithExistingFallbackEntry($childData, $
255
255
$ this ->readerImpl ->expects ($ this ->at (0 ))
256
256
->method ('read ' )
257
257
->with (self ::RES_DIR , 'en_GB ' )
258
- ->will ( $ this -> returnValue ( ['Foo ' => 'Baz ' ]) );
258
+ ->willReturn ( ['Foo ' => 'Baz ' ]);
259
259
260
260
$ this ->readerImpl ->expects ($ this ->at (1 ))
261
261
->method ('read ' )
262
262
->with (self ::RES_DIR , 'en ' )
263
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ parentData ]]) );
263
+ ->willReturn ( ['Foo ' => ['Bar ' => $ parentData ]]);
264
264
265
265
$ this ->assertSame ($ parentData , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Foo ' , 'Bar ' ], true ));
266
266
}
@@ -274,17 +274,17 @@ public function testMergeExistingEntryWithNonExistingFallbackEntry($childData, $
274
274
$ this ->readerImpl ->expects ($ this ->at (0 ))
275
275
->method ('read ' )
276
276
->with (self ::RES_DIR , 'en_GB ' )
277
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
277
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
278
278
279
279
$ this ->readerImpl ->expects ($ this ->at (1 ))
280
280
->method ('read ' )
281
281
->with (self ::RES_DIR , 'en ' )
282
- ->will ( $ this -> returnValue ( ['Foo ' => 'Bar ' ]) );
282
+ ->willReturn ( ['Foo ' => 'Bar ' ]);
283
283
} else {
284
284
$ this ->readerImpl ->expects ($ this ->once ())
285
285
->method ('read ' )
286
286
->with (self ::RES_DIR , 'en_GB ' )
287
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
287
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
288
288
}
289
289
290
290
$ this ->assertSame ($ childData , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Foo ' , 'Bar ' ], true ));
@@ -298,12 +298,12 @@ public function testFailIfEntryFoundNeitherInParentNorChild()
298
298
$ this ->readerImpl ->expects ($ this ->at (0 ))
299
299
->method ('read ' )
300
300
->with (self ::RES_DIR , 'en_GB ' )
301
- ->will ( $ this -> returnValue ( ['Foo ' => 'Baz ' ]) );
301
+ ->willReturn ( ['Foo ' => 'Baz ' ]);
302
302
303
303
$ this ->readerImpl ->expects ($ this ->at (1 ))
304
304
->method ('read ' )
305
305
->with (self ::RES_DIR , 'en ' )
306
- ->will ( $ this -> returnValue ( ['Foo ' => 'Bar ' ]) );
306
+ ->willReturn ( ['Foo ' => 'Bar ' ]);
307
307
308
308
$ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Foo ' , 'Bar ' ], true );
309
309
}
@@ -320,17 +320,17 @@ public function testMergeTraversables($childData, $parentData, $result)
320
320
$ this ->readerImpl ->expects ($ this ->at (0 ))
321
321
->method ('read ' )
322
322
->with (self ::RES_DIR , 'en_GB ' )
323
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
323
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
324
324
325
325
$ this ->readerImpl ->expects ($ this ->at (1 ))
326
326
->method ('read ' )
327
327
->with (self ::RES_DIR , 'en ' )
328
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ parentData ]]) );
328
+ ->willReturn ( ['Foo ' => ['Bar ' => $ parentData ]]);
329
329
} else {
330
330
$ this ->readerImpl ->expects ($ this ->once ())
331
331
->method ('read ' )
332
332
->with (self ::RES_DIR , 'en_GB ' )
333
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
333
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
334
334
}
335
335
336
336
$ this ->assertSame ($ result , $ this ->reader ->readEntry (self ::RES_DIR , 'en_GB ' , ['Foo ' , 'Bar ' ], true ));
@@ -347,18 +347,18 @@ public function testFollowLocaleAliases($childData, $parentData, $result)
347
347
$ this ->readerImpl ->expects ($ this ->at (0 ))
348
348
->method ('read ' )
349
349
->with (self ::RES_DIR , 'ro_MD ' )
350
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
350
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
351
351
352
352
// Read fallback locale of aliased locale ("ro_MD" -> "ro")
353
353
$ this ->readerImpl ->expects ($ this ->at (1 ))
354
354
->method ('read ' )
355
355
->with (self ::RES_DIR , 'ro ' )
356
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ parentData ]]) );
356
+ ->willReturn ( ['Foo ' => ['Bar ' => $ parentData ]]);
357
357
} else {
358
358
$ this ->readerImpl ->expects ($ this ->once ())
359
359
->method ('read ' )
360
360
->with (self ::RES_DIR , 'ro_MD ' )
361
- ->will ( $ this -> returnValue ( ['Foo ' => ['Bar ' => $ childData ]]) );
361
+ ->willReturn ( ['Foo ' => ['Bar ' => $ childData ]]);
362
362
}
363
363
364
364
$ this ->assertSame ($ result , $ this ->reader ->readEntry (self ::RES_DIR , 'mo ' , ['Foo ' , 'Bar ' ], true ));
0 commit comments