File tree Expand file tree Collapse file tree 4 files changed +6
-1
lines changed
dev/tests/integration/testsuite/Magento/Usps/Model Expand file tree Collapse file tree 4 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ protected function _setFreeMethodRequest($freeMethod)
743743 $ r = $ this ->_rawRequest ;
744744 $ weight = $ this ->getTotalNumOfBoxes ($ r ->getFreeMethodWeight ());
745745 $ r ->setWeight ($ weight );
746+ $ r ->setPackages ($ this ->createPackages ((float )$ r ->getFreeMethodWeight (), []));
746747 $ r ->setService ($ freeMethod );
747748 }
748749
Original file line number Diff line number Diff line change @@ -523,6 +523,9 @@ protected function _setFreeMethodRequest($freeMethod)
523523 $ weight = $ this ->getTotalNumOfBoxes ($ r ->getFreeMethodWeight ());
524524 $ weight = $ this ->_getCorrectWeight ($ weight );
525525 $ r ->setWeight ($ weight );
526+ $ r ->setPackages (
527+ $ this ->createPackages ((float )$ r ->getFreeMethodWeight (), [])
528+ );
526529 $ r ->setAction ($ this ->configHelper ->getCode ('action ' , 'single ' ));
527530 $ r ->setProduct ($ freeMethod );
528531 }
Original file line number Diff line number Diff line change @@ -474,6 +474,7 @@ protected function _setFreeMethodRequest($freeMethod)
474474 $ r ->setWeightPounds (floor ($ weight ));
475475 $ ounces = ($ weight - floor ($ weight )) * self ::OUNCES_POUND ;
476476 $ r ->setWeightOunces (sprintf ('%. ' . self ::$ weightPrecision . 'f ' , $ ounces ));
477+ $ r ->setPackages ($ this ->createPackages ((float )$ r ->getFreeMethodWeight (), []));
477478 $ r ->setService ($ freeMethod );
478479 }
479480
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ public function testPartialFreeShippingWithCoupon(): void
341341 $ this ->assertEquals ('ALL ' , $ firstRequest ->Package ->Service );
342342 $ this ->assertEquals ('20 ' , $ firstRequest ->Package ->Pounds );
343343 $ this ->assertEquals ('Priority ' , $ secondRequest ->Package ->Service );
344- $ this ->assertEquals ('20 ' , $ secondRequest ->Package ->Pounds );
344+ $ this ->assertEquals ('10 ' , $ secondRequest ->Package ->Pounds );
345345 $ price = $ this ->getShippingMethodAmount ($ methods , 'usps ' , '1 ' );
346346 $ this ->assertEquals (6.70 , $ price );
347347 }
You can’t perform that action at this time.
0 commit comments