Skip to content

Commit c997c53

Browse files
committed
MC-24548: collect-totals API call not updating the selected shippingMethod
1 parent 728edb7 commit c997c53

File tree

9 files changed

+120
-11
lines changed

9 files changed

+120
-11
lines changed

dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,6 @@ protected function tearDown(): void
8484
$this->_request = null;
8585
$this->_response = null;
8686
$this->_objectManager = null;
87-
88-
parent::tearDown();
89-
90-
// Release all objects saved in test class properties
91-
$reflection = new \ReflectionObject($this);
92-
foreach ($reflection->getProperties() as $property) {
93-
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
94-
$property->setAccessible(true);
95-
$property->setValue($this, null);
96-
}
97-
}
9887
}
9988

10089
/**

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/MassDeleteTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,19 @@ protected function dispatchMassDeleteAction(array $productIds = []): void
151151
$this->getRequest()->setParams(['selected' => $productIds, 'namespace' => 'product_listing']);
152152
$this->dispatch('backend/catalog/product/massDelete/');
153153
}
154+
155+
/**
156+
* @inheritDoc
157+
*/
158+
protected function tearDown(): void
159+
{
160+
parent::tearDown();
161+
$reflection = new \ReflectionObject($this);
162+
foreach ($reflection->getProperties() as $property) {
163+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
164+
$property->setAccessible(true);
165+
$property->setValue($this, null);
166+
}
167+
}
168+
}
154169
}

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Save/CreateCustomOptionsTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,19 @@ public function productWithNewOptionsDataProvider(): array
254254
],
255255
];
256256
}
257+
258+
/**
259+
* @inheritDoc
260+
*/
261+
protected function tearDown(): void
262+
{
263+
parent::tearDown();
264+
$reflection = new \ReflectionObject($this);
265+
foreach ($reflection->getProperties() as $property) {
266+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
267+
$property->setAccessible(true);
268+
$property->setValue($this, null);
269+
}
270+
}
271+
}
257272
}

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Save/DeleteCustomOptionsTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,19 @@ public function testDeleteCustomOptionWithTypeField(array $optionData): void
6161
->getProductOptions($product)
6262
);
6363
}
64+
65+
/**
66+
* @inheritDoc
67+
*/
68+
protected function tearDown(): void
69+
{
70+
parent::tearDown();
71+
$reflection = new \ReflectionObject($this);
72+
foreach ($reflection->getProperties() as $property) {
73+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
74+
$property->setAccessible(true);
75+
$property->setValue($this, null);
76+
}
77+
}
78+
}
6479
}

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Save/UpdateCustomOptionsTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,19 @@ public function testUpdateCustomOptionWithTypeField(array $optionData, array $up
107107
);
108108
}
109109
}
110+
111+
/**
112+
* @inheritDoc
113+
*/
114+
protected function tearDown(): void
115+
{
116+
parent::tearDown();
117+
$reflection = new \ReflectionObject($this);
118+
foreach ($reflection->getProperties() as $property) {
119+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
120+
$property->setAccessible(true);
121+
$property->setValue($this, null);
122+
}
123+
}
124+
}
110125
}

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Attribute/CreateOptionsTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,19 @@ public function testAddAlreadyAddedOption(): void
6161
$responseBody['message']
6262
);
6363
}
64+
65+
/**
66+
* @inheritDoc
67+
*/
68+
protected function tearDown(): void
69+
{
70+
parent::tearDown();
71+
$reflection = new \ReflectionObject($this);
72+
foreach ($reflection->getProperties() as $property) {
73+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
74+
$property->setAccessible(true);
75+
$property->setValue($this, null);
76+
}
77+
}
78+
}
6479
}

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/ProductTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,4 +519,19 @@ private function getProductIds(array $skuList): array
519519

520520
return $associatedProductIds;
521521
}
522+
523+
/**
524+
* @inheritDoc
525+
*/
526+
protected function tearDown(): void
527+
{
528+
parent::tearDown();
529+
$reflection = new \ReflectionObject($this);
530+
foreach ($reflection->getProperties() as $property) {
531+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
532+
$property->setAccessible(true);
533+
$property->setValue($this, null);
534+
}
535+
}
536+
}
522537
}

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/CartTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,19 @@ public function testExecuteForConfigurableLastOption()
9898
\Magento\Framework\Message\MessageInterface::TYPE_ERROR
9999
);
100100
}
101+
102+
/**
103+
* @inheritDoc
104+
*/
105+
protected function tearDown(): void
106+
{
107+
parent::tearDown();
108+
$reflection = new \ReflectionObject($this);
109+
foreach ($reflection->getProperties() as $property) {
110+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
111+
$property->setAccessible(true);
112+
$property->setValue($this, null);
113+
}
114+
}
115+
}
101116
}

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/OptionRepositoryTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,19 @@ public function testGetListWithExtensionAttributes()
3232
"Extension attributes were not loaded correctly"
3333
);
3434
}
35+
36+
/**
37+
* @inheritDoc
38+
*/
39+
protected function tearDown(): void
40+
{
41+
parent::tearDown();
42+
$reflection = new \ReflectionObject($this);
43+
foreach ($reflection->getProperties() as $property) {
44+
if (!$property->isStatic() && 0 !== strpos($property->getDeclaringClass()->getName(), 'PHPUnit')) {
45+
$property->setAccessible(true);
46+
$property->setValue($this, null);
47+
}
48+
}
49+
}
3550
}

0 commit comments

Comments
 (0)