@@ -195,14 +195,11 @@ public function testAfterSave(
195
195
$ orderMock = $ this ->setupOrderMock ();
196
196
197
197
$ extensionAttributeMock = $ this ->setupExtensionAttributeMock ();
198
- $ extensionAttributeMock ->expects ($ this ->any ())
199
- ->method ('getConvertingFromQuote ' )
198
+ $ extensionAttributeMock ->method ('getConvertingFromQuote ' )
200
199
->willReturn (true );
201
- $ extensionAttributeMock ->expects ($ this ->any ())
202
- ->method ('getAppliedTaxes ' )
200
+ $ extensionAttributeMock ->method ('getAppliedTaxes ' )
203
201
->willReturn ($ appliedTaxes );
204
- $ extensionAttributeMock ->expects ($ this ->any ())
205
- ->method ('getItemAppliedTaxes ' )
202
+ $ extensionAttributeMock ->method ('getItemAppliedTaxes ' )
206
203
->willReturn ($ itemAppliedTaxes );
207
204
208
205
$ orderItemMock = $ this ->getMockBuilder (\Magento \Sales \Model \Order \Item::class)
@@ -211,23 +208,18 @@ public function testAfterSave(
211
208
->getMock ();
212
209
$ orderItemMock ->method ('getId ' )
213
210
->willReturn ($ itemId );
214
- $ orderMock ->expects ($ this ->once ())
215
- ->method ('getAppliedTaxIsSaved ' )
211
+ $ orderMock ->method ('getAppliedTaxIsSaved ' )
216
212
->willReturn (false );
217
- $ orderMock ->expects ($ this ->once ())
218
- ->method ('getExtensionAttributes ' )
213
+ $ orderMock ->method ('getExtensionAttributes ' )
219
214
->willReturn ($ extensionAttributeMock );
220
215
$ itemByQuoteId = $ itemId ? $ orderItemMock : $ itemId ;
221
- $ orderMock ->expects ($ this ->atLeastOnce ())
222
- ->method ('getItemByQuoteItemId ' )
216
+ $ orderMock ->method ('getItemByQuoteItemId ' )
223
217
->with (self ::ITEMID )
224
218
->willReturn ($ itemByQuoteId );
225
- $ orderMock ->expects ($ this ->atLeastOnce ())
226
- ->method ('getEntityId ' )
219
+ $ orderMock ->method ('getEntityId ' )
227
220
->willReturn (self ::ORDERID );
228
221
229
- $ orderMock ->expects ($ this ->once ())
230
- ->method ('setAppliedTaxIsSaved ' )
222
+ $ orderMock ->method ('setAppliedTaxIsSaved ' )
231
223
->with (true );
232
224
233
225
$ this ->verifyOrderTaxes ($ expectedTaxes );
0 commit comments