@@ -112,24 +112,24 @@ protected function setUp()
112
112
->willReturn ($ this ->storeMock );
113
113
$ this ->storeCookieManager ->expects ($ this ->once ())
114
114
->method ('getStoreCodeFromCookie ' )
115
- ->will ( $ this -> returnValue ( 'storeCookie ' ) );
115
+ ->willReturn ( 'storeCookie ' );
116
116
$ this ->currentStoreMock ->expects ($ this ->any ())
117
117
->method ('getDefaultCurrencyCode ' )
118
- ->will ( $ this -> returnValue ( self ::CURRENCY_CURRENT_STORE ) );
118
+ ->willReturn ( self ::CURRENCY_CURRENT_STORE );
119
119
}
120
120
121
121
public function testBeforeDispatchCurrencyFromSession ()
122
122
{
123
123
$ this ->storeManager ->expects ($ this ->once ())
124
124
->method ('getWebsite ' )
125
- ->will ($ this ->returnValue ( $ this -> websiteMock ) );
125
+ ->willReturn ($ this ->websiteMock );
126
126
$ this ->websiteMock ->expects ($ this ->once ())
127
127
->method ('getDefaultStore ' )
128
- ->will ($ this ->returnValue ( $ this -> storeMock ) );
128
+ ->willReturn ($ this ->storeMock );
129
129
130
130
$ this ->storeMock ->expects ($ this ->once ())
131
131
->method ('getDefaultCurrencyCode ' )
132
- ->will ( $ this -> returnValue ( self ::CURRENCY_DEFAULT ) );
132
+ ->willReturn ( self ::CURRENCY_DEFAULT );
133
133
134
134
$ this ->storeMock ->expects ($ this ->once ())
135
135
->method ('getCode ' )
@@ -141,15 +141,15 @@ public function testBeforeDispatchCurrencyFromSession()
141
141
$ this ->requestMock ->expects ($ this ->once ())
142
142
->method ('getParam ' )
143
143
->with ($ this ->equalTo ('___store ' ))
144
- ->will ( $ this -> returnValue ( 'default ' ) );
144
+ ->willReturn ( 'default ' );
145
145
146
146
$ this ->storeManager ->method ('getStore ' )
147
147
->with ('default ' )
148
148
->willReturn ($ this ->currentStoreMock );
149
149
150
150
$ this ->sessionMock ->expects ($ this ->any ())
151
151
->method ('getCurrencyCode ' )
152
- ->will ( $ this -> returnValue ( self ::CURRENCY_SESSION ) );
152
+ ->willReturn ( self ::CURRENCY_SESSION );
153
153
154
154
$ this ->httpContextMock ->expects ($ this ->at (1 ))
155
155
->method ('setValue ' )
@@ -177,14 +177,14 @@ public function testDispatchCurrentStoreCurrency()
177
177
{
178
178
$ this ->storeManager ->expects ($ this ->once ())
179
179
->method ('getWebsite ' )
180
- ->will ($ this ->returnValue ( $ this -> websiteMock ) );
180
+ ->willReturn ($ this ->websiteMock );
181
181
$ this ->websiteMock ->expects ($ this ->once ())
182
182
->method ('getDefaultStore ' )
183
- ->will ($ this ->returnValue ( $ this -> storeMock ) );
183
+ ->willReturn ($ this ->storeMock );
184
184
185
185
$ this ->storeMock ->expects ($ this ->once ())
186
186
->method ('getDefaultCurrencyCode ' )
187
- ->will ( $ this -> returnValue ( self ::CURRENCY_DEFAULT ) );
187
+ ->willReturn ( self ::CURRENCY_DEFAULT );
188
188
189
189
$ this ->storeMock ->expects ($ this ->once ())
190
190
->method ('getCode ' )
@@ -196,7 +196,7 @@ public function testDispatchCurrentStoreCurrency()
196
196
$ this ->requestMock ->expects ($ this ->once ())
197
197
->method ('getParam ' )
198
198
->with ($ this ->equalTo ('___store ' ))
199
- ->will ( $ this -> returnValue ( 'default ' ) );
199
+ ->willReturn ( 'default ' );
200
200
201
201
$ this ->storeManager ->method ('getStore ' )
202
202
->with ('default ' )
@@ -229,14 +229,14 @@ public function testDispatchStoreParameterIsArray()
229
229
{
230
230
$ this ->storeManager ->expects ($ this ->once ())
231
231
->method ('getWebsite ' )
232
- ->will ($ this ->returnValue ( $ this -> websiteMock ) );
232
+ ->willReturn ($ this ->websiteMock );
233
233
$ this ->websiteMock ->expects ($ this ->once ())
234
234
->method ('getDefaultStore ' )
235
- ->will ($ this ->returnValue ( $ this -> storeMock ) );
235
+ ->willReturn ($ this ->storeMock );
236
236
237
237
$ this ->storeMock ->expects ($ this ->once ())
238
238
->method ('getDefaultCurrencyCode ' )
239
- ->will ( $ this -> returnValue ( self ::CURRENCY_DEFAULT ) );
239
+ ->willReturn ( self ::CURRENCY_DEFAULT );
240
240
241
241
$ this ->storeMock ->expects ($ this ->once ())
242
242
->method ('getCode ' )
@@ -254,7 +254,7 @@ public function testDispatchStoreParameterIsArray()
254
254
$ this ->requestMock ->expects ($ this ->once ())
255
255
->method ('getParam ' )
256
256
->with ($ this ->equalTo ('___store ' ))
257
- ->will ( $ this -> returnValue ( $ store) );
257
+ ->willReturn ( $ store );
258
258
259
259
$ this ->storeManager ->expects ($ this ->once ())
260
260
->method ('getStore ' )
@@ -291,13 +291,13 @@ public function testDispatchStoreParameterIsInvalidArray()
291
291
{
292
292
$ this ->storeManager ->expects ($ this ->once ())
293
293
->method ('getWebsite ' )
294
- ->will ($ this ->returnValue ( $ this -> websiteMock ) );
294
+ ->willReturn ($ this ->websiteMock );
295
295
$ this ->websiteMock ->expects ($ this ->once ())
296
296
->method ('getDefaultStore ' )
297
- ->will ($ this ->returnValue ( $ this -> storeMock ) );
297
+ ->willReturn ($ this ->storeMock );
298
298
$ this ->storeMock ->expects ($ this ->exactly (2 ))
299
299
->method ('getDefaultCurrencyCode ' )
300
- ->will ( $ this -> returnValue ( self ::CURRENCY_DEFAULT ) );
300
+ ->willReturn ( self ::CURRENCY_DEFAULT );
301
301
302
302
$ this ->storeMock ->expects ($ this ->exactly (2 ))
303
303
->method ('getCode ' )
@@ -315,7 +315,7 @@ public function testDispatchStoreParameterIsInvalidArray()
315
315
$ this ->requestMock ->expects ($ this ->once ())
316
316
->method ('getParam ' )
317
317
->with ($ this ->equalTo ('___store ' ))
318
- ->will ( $ this -> returnValue ( $ store) );
318
+ ->willReturn ( $ store );
319
319
$ this ->storeManager ->expects ($ this ->once ())
320
320
->method ('getStore ' )
321
321
->with ()
@@ -347,13 +347,13 @@ public function testDispatchNonExistingStore()
347
347
->willReturn ($ this ->storeMock );
348
348
$ this ->storeManager ->expects ($ this ->once ())
349
349
->method ('getWebsite ' )
350
- ->will ($ this ->returnValue ( $ this -> websiteMock ) );
350
+ ->willReturn ($ this ->websiteMock );
351
351
$ this ->websiteMock ->expects ($ this ->once ())
352
352
->method ('getDefaultStore ' )
353
- ->will ($ this ->returnValue ( $ this -> storeMock ) );
353
+ ->willReturn ($ this ->storeMock );
354
354
$ this ->storeMock ->expects ($ this ->exactly (2 ))
355
355
->method ('getDefaultCurrencyCode ' )
356
- ->will ( $ this -> returnValue ( self ::CURRENCY_DEFAULT ) );
356
+ ->willReturn ( self ::CURRENCY_DEFAULT );
357
357
358
358
$ this ->storeMock ->expects ($ this ->exactly (2 ))
359
359
->method ('getCode ' )
0 commit comments