File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Model/Quote/Address/Total
Test/Unit/Model/Quote/Address/Total Expand file tree Collapse file tree 2 files changed +10
-5
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 ())
You can’t perform that action at this time.
0 commit comments