@@ -370,20 +370,20 @@ public function testInitTotalsCanApplyDiscount()
370
370
$ validator ->expects ($ this ->at (0 ))->method ('isValid ' )->with ($ item1 )->willReturn (false );
371
371
$ validator ->expects ($ this ->at (1 ))->method ('isValid ' )->with ($ item2 )->willReturn (true );
372
372
373
- $ item1 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (false );
374
- $ item1 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (false );
373
+ $ item1 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (null );
374
+ $ item1 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (null );
375
375
$ item1 ->expects ($ this ->never ())->method ('getDiscountCalculationPrice ' );
376
376
$ item1 ->expects ($ this ->never ())->method ('getBaseDiscountCalculationPrice ' );
377
- $ item2 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (false );
378
- $ item2 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (false );
377
+ $ item2 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (null );
378
+ $ item2 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (null );
379
379
$ item2 ->expects ($ this ->any ())->method ('getDiscountCalculationPrice ' )->willReturn (50 );
380
380
$ item2 ->expects ($ this ->once ())->method ('getBaseDiscountCalculationPrice ' )->willReturn (50 );
381
- $ item3 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (false );
382
- $ item3 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (true );
381
+ $ item3 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (null );
382
+ $ item3 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn ($ item1 );
383
383
$ item3 ->expects ($ this ->never ())->method ('getDiscountCalculationPrice ' );
384
384
$ item3 ->expects ($ this ->never ())->method ('getBaseDiscountCalculationPrice ' );
385
- $ item4 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (true );
386
- $ item4 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (false );
385
+ $ item4 ->expects ($ this ->any ())->method ('getParentItemId ' )->willReturn (12345 );
386
+ $ item4 ->expects ($ this ->any ())->method ('getParentItem ' )->willReturn (null );
387
387
$ item4 ->expects ($ this ->never ())->method ('getDiscountCalculationPrice ' );
388
388
$ item4 ->expects ($ this ->never ())->method ('getBaseDiscountCalculationPrice ' );
389
389
$ this ->utility ->expects ($ this ->once ())->method ('getItemQty ' )->willReturn (1 );
0 commit comments