@@ -89,11 +89,14 @@ public function testCollectItemNoDiscount()
89
89
{
90
90
$ itemNoDiscount = $ this ->getMockBuilder ('Magento\Sales\Model\Quote\Item ' )
91
91
->disableOriginalConstructor ()
92
- ->setMethods (['getNoDiscount ' , '__wakeup ' ])
92
+ ->setMethods (['getNoDiscount ' , 'setIsApplyDiscount ' , ' __wakeup ' ])
93
93
->getMock ();
94
94
$ itemNoDiscount ->expects ($ this ->once ())
95
95
->method ('getNoDiscount ' )
96
96
->willReturn (true );
97
+ $ itemNoDiscount ->expects ($ this ->once ())
98
+ ->method ('setIsApplyDiscount ' )
99
+ ->willReturn (false );
97
100
98
101
$ this ->validatorMock ->expects ($ this ->any ())
99
102
->method ('sortItemsByPriority ' )
@@ -201,6 +204,7 @@ public function testCollectItemHasChildren($childItemData, $parentData, $expecte
201
204
'getHasChildren ' ,
202
205
'isChildrenCalculated ' ,
203
206
'getChildren ' ,
207
+ 'setIsApplyDiscount ' ,
204
208
'__wakeup ' ,
205
209
]
206
210
)
@@ -214,6 +218,9 @@ public function testCollectItemHasChildren($childItemData, $parentData, $expecte
214
218
$ itemWithChildren ->expects ($ this ->once ())
215
219
->method ('getHasChildren ' )
216
220
->willReturn (true );
221
+ $ itemWithChildren ->expects ($ this ->once ())
222
+ ->method ('setIsApplyDiscount ' )
223
+ ->willReturn (true );
217
224
$ itemWithChildren ->expects ($ this ->once ())
218
225
->method ('isChildrenCalculated ' )
219
226
->willReturn (true );
@@ -332,13 +339,17 @@ public function testCollectItemHasNoChildren()
332
339
'getHasChildren ' ,
333
340
'isChildrenCalculated ' ,
334
341
'getChildren ' ,
342
+ 'setIsApplyDiscount ' ,
335
343
'__wakeup ' ,
336
344
]
337
345
)
338
346
->getMock ();
339
347
$ itemWithChildren ->expects ($ this ->once ())
340
348
->method ('getNoDiscount ' )
341
349
->willReturn (false );
350
+ $ itemWithChildren ->expects ($ this ->once ())
351
+ ->method ('setIsApplyDiscount ' )
352
+ ->willReturn (true );
342
353
$ itemWithChildren ->expects ($ this ->once ())
343
354
->method ('getParentItem ' )
344
355
->willReturn (false );
0 commit comments