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(
7373 $ address ->setFreeMethodWeight ($ data ['freeMethodWeight ' ]);
7474
7575 $ isFreeShipping = $ this ->freeShipping ->isFreeShipping ($ quote , $ shippingAssignment ->getItems ());
76- $ address ->setFreeShipping ($ isFreeShipping );
76+ $ address ->setFreeShipping (( int ) $ isFreeShipping );
7777 // recalculate weights
7878 $ data = $ this ->getAssignmentWeightData ($ address , $ shippingAssignment ->getItems ());
7979 $ address ->setItemQty ($ data ['addressQty ' ]);
Original file line number Diff line number Diff line change @@ -209,11 +209,16 @@ public function testCollect(): void
209209 $ this ->shippingAssignment ->expects ($ this ->atLeastOnce ())
210210 ->method ('getItems ' )
211211 ->willReturn ([$ this ->cartItem ]);
212- $ this ->freeShipping ->method ('isFreeShipping ' )
212+ $ isFreeShipping = true ;
213+ $ this ->freeShipping
214+ ->expects ($ this ->once ())
215+ ->method ('isFreeShipping ' )
213216 ->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 );
217222 $ this ->total ->expects ($ this ->atLeastOnce ())
218223 ->method ('setTotalAmount ' );
219224 $ this ->total ->expects ($ this ->atLeastOnce ())
Original file line number Diff line number Diff line change 6464 'is_rss ' => 1 ,
6565 'use_auto_generation ' => 0 ,
6666 'uses_per_coupon ' => 0 ,
67- 'simple_free_shipping ' => 2 ,
67+ 'simple_free_shipping ' => 1 ,
6868
6969 'website_ids ' => [
7070 $ objectManager ->get (StoreManagerInterface::class)->getWebsite ()->getId ()
You can’t perform that action at this time.
0 commit comments