@@ -195,14 +195,11 @@ public function testAfterSave(
195195 $ orderMock = $ this ->setupOrderMock ();
196196
197197 $ extensionAttributeMock = $ this ->setupExtensionAttributeMock ();
198- $ extensionAttributeMock ->expects ($ this ->any ())
199- ->method ('getConvertingFromQuote ' )
198+ $ extensionAttributeMock ->method ('getConvertingFromQuote ' )
200199 ->willReturn (true );
201- $ extensionAttributeMock ->expects ($ this ->any ())
202- ->method ('getAppliedTaxes ' )
200+ $ extensionAttributeMock ->method ('getAppliedTaxes ' )
203201 ->willReturn ($ appliedTaxes );
204- $ extensionAttributeMock ->expects ($ this ->any ())
205- ->method ('getItemAppliedTaxes ' )
202+ $ extensionAttributeMock ->method ('getItemAppliedTaxes ' )
206203 ->willReturn ($ itemAppliedTaxes );
207204
208205 $ orderItemMock = $ this ->getMockBuilder (\Magento \Sales \Model \Order \Item::class)
@@ -211,23 +208,18 @@ public function testAfterSave(
211208 ->getMock ();
212209 $ orderItemMock ->method ('getId ' )
213210 ->willReturn ($ itemId );
214- $ orderMock ->expects ($ this ->once ())
215- ->method ('getAppliedTaxIsSaved ' )
211+ $ orderMock ->method ('getAppliedTaxIsSaved ' )
216212 ->willReturn (false );
217- $ orderMock ->expects ($ this ->once ())
218- ->method ('getExtensionAttributes ' )
213+ $ orderMock ->method ('getExtensionAttributes ' )
219214 ->willReturn ($ extensionAttributeMock );
220215 $ itemByQuoteId = $ itemId ? $ orderItemMock : $ itemId ;
221- $ orderMock ->expects ($ this ->atLeastOnce ())
222- ->method ('getItemByQuoteItemId ' )
216+ $ orderMock ->method ('getItemByQuoteItemId ' )
223217 ->with (self ::ITEMID )
224218 ->willReturn ($ itemByQuoteId );
225- $ orderMock ->expects ($ this ->atLeastOnce ())
226- ->method ('getEntityId ' )
219+ $ orderMock ->method ('getEntityId ' )
227220 ->willReturn (self ::ORDERID );
228221
229- $ orderMock ->expects ($ this ->once ())
230- ->method ('setAppliedTaxIsSaved ' )
222+ $ orderMock ->method ('setAppliedTaxIsSaved ' )
231223 ->with (true );
232224
233225 $ this ->verifyOrderTaxes ($ expectedTaxes );
0 commit comments