File tree 2 files changed +7
-2
lines changed
Model/Quote/Address/Total
Test/Unit/Model/Quote/Address/Total 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,8 @@ public function collect(
171
171
$ total ->setBaseTotalAmount ($ this ->getCode (), $ rate ->getPrice ());
172
172
$ shippingDescription = $ rate ->getCarrierTitle () . ' - ' . $ rate ->getMethodTitle ();
173
173
$ address ->setShippingDescription (trim ($ shippingDescription , ' - ' ));
174
- $ total ->setShippingAmount ($ rate ->getPrice ());
174
+ $ total ->setBaseShippingAmount ($ rate ->getPrice ());
175
+ $ total ->setShippingAmount ($ amountPrice );
175
176
$ total ->setShippingDescription ($ address ->getShippingDescription ());
176
177
break ;
177
178
}
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ protected function setUp()
70
70
'Magento\Quote\Model\Quote\Address\Total ' ,
71
71
[
72
72
'setShippingAmount ' ,
73
+ 'setBaseShippingAmount ' ,
73
74
'setBaseTotalAmount ' ,
74
75
'setTotalAmount ' ,
75
76
'setShippingDescription ' ,
@@ -229,9 +230,12 @@ public function testCollect()
229
230
$ this ->priceCurrency ->expects ($ this ->once ())
230
231
->method ('convert ' )
231
232
->with (5 , $ this ->store )
232
- ->willReturn (5 );
233
+ ->willReturn (10 );
233
234
$ this ->total ->expects ($ this ->once ())
234
235
->method ('setShippingAmount ' )
236
+ ->with (10 );
237
+ $ this ->total ->expects ($ this ->once ())
238
+ ->method ('setBaseShippingAmount ' )
235
239
->with (5 );
236
240
$ this ->rate ->expects ($ this ->once ())
237
241
->method ('getCarrierTitle ' )
You can’t perform that action at this time.
0 commit comments