File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ public function testCollectRefundShippingAmountIncTax()
426426 $ expectedShippingAmountInclTax = $ allowedShippingAmount + $ shippingTaxAmount - $ shippingTaxAmountRefunded ;
427427 $ expectedBaseShippingAmountInclTax =
428428 $ baseAllowedShippingAmount + $ baseShippingTaxAmount - $ baseShippingTaxAmountRefunded ;
429+ $ expectedBaseShippingAmountInclTax = max ($ expectedBaseShippingAmountInclTax , 0 );
429430 $ grandTotalBefore = 14.35 ;
430431 $ baseGrandTotalBefore = 14.35 ;
431432 $ expectedGrandTotal = $ grandTotalBefore + $ allowedShippingAmount ;
@@ -476,7 +477,7 @@ public function testCollectRefundShippingAmountIncTax()
476477 ->willReturnSelf ();
477478 $ this ->creditmemoMock ->expects ($ this ->once ())
478479 ->method ('setBaseShippingInclTax ' )
479- ->with ($ this -> shippingCollector -> getBaseAllowedAmountInclTax ( $ expectedBaseShippingAmountInclTax) )
480+ ->with ($ expectedBaseShippingAmountInclTax )
480481 ->willReturnSelf ();
481482 $ this ->creditmemoMock ->expects ($ this ->once ())
482483 ->method ('setGrandTotal ' )
@@ -486,10 +487,6 @@ public function testCollectRefundShippingAmountIncTax()
486487 ->method ('setBaseGrandTotal ' )
487488 ->with ($ expectedBaseGrandTotal )
488489 ->willReturnSelf ();
489- $ this ->assertEquals (
490- 0 ,
491- $ this ->shippingCollector ->getBaseAllowedAmountInclTax ($ expectedBaseShippingAmountInclTax )
492- );
493490 $ this ->shippingCollector ->collect ($ this ->creditmemoMock );
494491 }
495492}
You can’t perform that action at this time.
0 commit comments