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(
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 ())
You can’t perform that action at this time.
0 commit comments