Skip to content

Commit 493e01f

Browse files
Merge pull request #8908 from magento-gl/UPS_AC11811_29APR
Hammer:: Platform Health Scope
2 parents f76f2ec + ad5bde8 commit 493e01f

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

app/code/Magento/Ups/Model/Carrier.php

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,19 @@ public function setRequest(RateRequest $request)
432432
$unit = $this->getConfigData('unit_of_measure');
433433
}
434434
$rowRequest->setUnitMeasure($unit);
435+
436+
$rowRequest->setPackageHeight($request->getPackageHeight());
437+
$rowRequest->setPackageWidth($request->getPackageWidth());
438+
$rowRequest->setPackageDepth($request->getPackageDepth());
439+
440+
if ($rowRequest->getUnitMeasure() == 'KGS') {
441+
$rowRequest->setUnitDimensions('CM');
442+
$rowRequest->setUnitDimensionsDescription('Centimeter');
443+
} else {
444+
$rowRequest->setUnitDimensions('IN');
445+
$rowRequest->setUnitDimensionsDescription('Inches');
446+
}
447+
435448
$rowRequest->setIsReturn($request->getIsReturn());
436449
$rowRequest->setBaseSubtotalInclTax($request->getBaseSubtotalInclTax());
437450

@@ -1134,6 +1147,10 @@ protected function _getRestQuotes()
11341147
$rateParams['RateRequest']['Shipment']['Service']['Description'] = $serviceDescription;
11351148
}
11361149

1150+
$height = $rowRequest->getPackageHeight() ?? 0;
1151+
$width = $rowRequest->getPackageWidth() ?? 0;
1152+
$length = $rowRequest->getPackageDepth() ?? 0;
1153+
11371154
foreach ($rowRequest->getPackages() as $package) {
11381155
$rateParams['RateRequest']['Shipment']['Package'][] = [
11391156
"PackagingType" => [
@@ -1142,12 +1159,12 @@ protected function _getRestQuotes()
11421159
],
11431160
"Dimensions" => [
11441161
"UnitOfMeasurement" => [
1145-
"Code" => "IN",
1146-
"Description" => "Inches"
1162+
"Code" => "{$rowRequest->getUnitDimensions()}",
1163+
"Description" => "{$rowRequest->getUnitDimensionsDescription()}"
11471164
],
1148-
"Length" => "5",
1149-
"Width" => "5",
1150-
"Height" => "5"
1165+
"Length" => "{$length}",
1166+
"Width" => "{$width}",
1167+
"Height" => "{$height}"
11511168
],
11521169
"PackageWeight" => [
11531170
"UnitOfMeasurement" => [

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4040
}
4141

42-
$this->graphQlStateDiff = new GraphQlStateDiff($this);
42+
$this->graphQlStateDiff = new GraphQlStateDiff();
4343
parent::setUp();
4444
}
4545

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCustomerMutationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function setUp(): void
3636
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
3737
}
3838

39-
$this->graphQlStateDiff = new GraphQlStateDiff($this);
39+
$this->graphQlStateDiff = new GraphQlStateDiff();
4040
parent::setUp();
4141
}
4242

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4040
}
4141

42-
$this->graphQlStateDiff = new GraphQlStateDiff($this);
42+
$this->graphQlStateDiff = new GraphQlStateDiff();
4343
parent::setUp();
4444
}
4545

dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,9 @@ class GraphQlStateDiff
5757

5858
/**
5959
* Constructor
60-
*
61-
* @param TestCase $test
6260
*/
63-
public function __construct(TestCase $test)
61+
public function __construct()
6462
{
65-
if (8 == PHP_MAJOR_VERSION && 3 == PHP_MINOR_VERSION && PHP_RELEASE_VERSION < 5) {
66-
$test->markTestSkipped(
67-
"This test isn't compatible with PHP 8.3 versions less than PHP 8.3.5 because of "
68-
. "bug in garbage collector. https://github.com/php/php-src/issues/13569"
69-
. " will roll back in AC-11491"
70-
);
71-
}
7263
$this->objectManagerBeforeTest = Bootstrap::getObjectManager();
7364
$this->objectManagerForTest = new ObjectManager($this->objectManagerBeforeTest);
7465
$this->objectManagerForTest->getFactory()->setObjectManager($this->objectManagerForTest);

0 commit comments

Comments
 (0)