File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Model/Quote/Address/Total
Test/Unit/Model/Quote/Address/Total
dev/tests/integration/testsuite/Magento/SalesRule/_files Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public function collect(
73
73
$ address ->setFreeMethodWeight ($ data ['freeMethodWeight ' ]);
74
74
75
75
$ isFreeShipping = $ this ->freeShipping ->isFreeShipping ($ quote , $ shippingAssignment ->getItems ());
76
- $ address ->setFreeShipping ($ isFreeShipping );
76
+ $ address ->setFreeShipping (( int ) $ isFreeShipping );
77
77
// recalculate weights
78
78
$ data = $ this ->getAssignmentWeightData ($ address , $ shippingAssignment ->getItems ());
79
79
$ address ->setItemQty ($ data ['addressQty ' ]);
Original file line number Diff line number Diff line change @@ -209,11 +209,16 @@ public function testCollect(): void
209
209
$ this ->shippingAssignment ->expects ($ this ->atLeastOnce ())
210
210
->method ('getItems ' )
211
211
->willReturn ([$ this ->cartItem ]);
212
- $ this ->freeShipping ->method ('isFreeShipping ' )
212
+ $ isFreeShipping = true ;
213
+ $ this ->freeShipping
214
+ ->expects ($ this ->once ())
215
+ ->method ('isFreeShipping ' )
213
216
->with ($ this ->quote , [$ this ->cartItem ])
214
- ->willReturn (true );
215
- $ this ->address ->method ('setFreeShipping ' )
216
- ->with (true );
217
+ ->willReturn ($ isFreeShipping );
218
+ $ this ->address
219
+ ->expects ($ this ->once ())
220
+ ->method ('setFreeShipping ' )
221
+ ->with ((int )$ isFreeShipping );
217
222
$ this ->total ->expects ($ this ->atLeastOnce ())
218
223
->method ('setTotalAmount ' );
219
224
$ this ->total ->expects ($ this ->atLeastOnce ())
Original file line number Diff line number Diff line change 64
64
'is_rss ' => 1 ,
65
65
'use_auto_generation ' => 0 ,
66
66
'uses_per_coupon ' => 0 ,
67
- 'simple_free_shipping ' => 2 ,
67
+ 'simple_free_shipping ' => 1 ,
68
68
69
69
'website_ids ' => [
70
70
$ objectManager ->get (StoreManagerInterface::class)->getWebsite ()->getId ()
You can’t perform that action at this time.
0 commit comments