@@ -173,10 +173,7 @@ public function testInitializeWithSubitem()
173
173
->method ('checkQuoteItemQty ' )
174
174
->withAnyParameters ()
175
175
->willReturn ($ result );
176
- $ this ->stockStateProviderMock ->expects ($ this ->once ())
177
- ->method ('checkQuoteItemQty ' )
178
- ->withAnyParameters ()
179
- ->willReturn ($ result );
176
+ $ this ->stockStateProviderMock ->expects ($ this ->never ())->method ('checkQuoteItemQty ' );
180
177
$ product ->expects ($ this ->once ())
181
178
->method ('getCustomOption ' )
182
179
->with ('product_type ' )
@@ -213,7 +210,7 @@ public function testInitializeWithSubitem()
213
210
$ quoteItem ->expects ($ this ->once ())->method ('setUseOldQty ' )->with ('item ' )->willReturnSelf ();
214
211
$ result ->expects ($ this ->exactly (2 ))->method ('getMessage ' )->willReturn ('message ' );
215
212
$ quoteItem ->expects ($ this ->once ())->method ('setMessage ' )->with ('message ' )->willReturnSelf ();
216
- $ result ->expects ($ this ->exactly (3 ))->method ('getItemBackorders ' )->willReturn ('backorders ' );
213
+ $ result ->expects ($ this ->exactly (2 ))->method ('getItemBackorders ' )->willReturn ('backorders ' );
217
214
$ quoteItem ->expects ($ this ->once ())->method ('setBackorders ' )->with ('backorders ' )->willReturnSelf ();
218
215
$ quoteItem ->expects ($ this ->once ())->method ('setStockStateResult ' )->with ($ result )->willReturnSelf ();
219
216
@@ -276,10 +273,7 @@ public function testInitializeWithoutSubitem()
276
273
->method ('checkQuoteItemQty ' )
277
274
->withAnyParameters ()
278
275
->willReturn ($ result );
279
- $ this ->stockStateProviderMock ->expects ($ this ->once ())
280
- ->method ('checkQuoteItemQty ' )
281
- ->withAnyParameters ()
282
- ->willReturn ($ result );
276
+ $ this ->stockStateProviderMock ->expects ($ this ->never ())->method ('checkQuoteItemQty ' );
283
277
$ product ->expects ($ this ->once ())
284
278
->method ('getCustomOption ' )
285
279
->with ('product_type ' )
@@ -299,7 +293,7 @@ public function testInitializeWithoutSubitem()
299
293
$ result ->expects ($ this ->once ())->method ('getHasQtyOptionUpdate ' )->willReturn (false );
300
294
$ result ->expects ($ this ->once ())->method ('getItemUseOldQty ' )->willReturn (null );
301
295
$ result ->expects ($ this ->once ())->method ('getMessage ' )->willReturn (null );
302
- $ result ->expects ($ this ->exactly (2 ))->method ('getItemBackorders ' )->willReturn (null );
296
+ $ result ->expects ($ this ->exactly (1 ))->method ('getItemBackorders ' )->willReturn (null );
303
297
304
298
$ this ->model ->initialize ($ stockItem , $ quoteItem , $ qty );
305
299
}
0 commit comments