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()
426
426
$ expectedShippingAmountInclTax = $ allowedShippingAmount + $ shippingTaxAmount - $ shippingTaxAmountRefunded ;
427
427
$ expectedBaseShippingAmountInclTax =
428
428
$ baseAllowedShippingAmount + $ baseShippingTaxAmount - $ baseShippingTaxAmountRefunded ;
429
+ $ expectedBaseShippingAmountInclTax = max ($ expectedBaseShippingAmountInclTax , 0 );
429
430
$ grandTotalBefore = 14.35 ;
430
431
$ baseGrandTotalBefore = 14.35 ;
431
432
$ expectedGrandTotal = $ grandTotalBefore + $ allowedShippingAmount ;
@@ -476,7 +477,7 @@ public function testCollectRefundShippingAmountIncTax()
476
477
->willReturnSelf ();
477
478
$ this ->creditmemoMock ->expects ($ this ->once ())
478
479
->method ('setBaseShippingInclTax ' )
479
- ->with ($ this -> shippingCollector -> getBaseAllowedAmountInclTax ( $ expectedBaseShippingAmountInclTax) )
480
+ ->with ($ expectedBaseShippingAmountInclTax )
480
481
->willReturnSelf ();
481
482
$ this ->creditmemoMock ->expects ($ this ->once ())
482
483
->method ('setGrandTotal ' )
@@ -486,10 +487,6 @@ public function testCollectRefundShippingAmountIncTax()
486
487
->method ('setBaseGrandTotal ' )
487
488
->with ($ expectedBaseGrandTotal )
488
489
->willReturnSelf ();
489
- $ this ->assertEquals (
490
- 0 ,
491
- $ this ->shippingCollector ->getBaseAllowedAmountInclTax ($ expectedBaseShippingAmountInclTax )
492
- );
493
490
$ this ->shippingCollector ->collect ($ this ->creditmemoMock );
494
491
}
495
492
}
You can’t perform that action at this time.
0 commit comments