Skip to content

Commit 1c86a11

Browse files
author
Yu Tang
committed
MAGETWO-28253: Downloadable Integration API
- Fixed SOAP test failure and static test failure
1 parent 0689e70 commit 1c86a11

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

dev/tests/api-functional/testsuite/Magento/Downloadable/Api/ProductRepositoryTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ protected function createDownloadableProduct()
148148
"price" => 10,
149149
'attribute_set_id' => 4,
150150
"extension_attributes" => [
151-
"downloadable_product_links" => $this->getLinkData(),
152-
"downloadable_product_samples" => $this->getSampleData(),
151+
"downloadable_product_links" => array_values($this->getLinkData()),
152+
"downloadable_product_samples" => array_values($this->getSampleData()),
153153
],
154154
];
155155

@@ -232,7 +232,7 @@ public function testUpdateDownloadableProductLinks()
232232

233233
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"] =
234234
[$updatedLink1Data, $linkData['link1'], $linkData['link2']];
235-
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"] = null;
235+
unset($response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"]);
236236

237237
$response = $this->saveProduct($response);
238238
$this->assertTrue(
@@ -334,7 +334,7 @@ public function testUpdateDownloadableProductLinksWithNewFile()
334334

335335
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"] =
336336
[$updatedLink1Data, $updatedLink2Data];
337-
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"] = null;
337+
unset($response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"]);
338338

339339
$response = $this->saveProduct($response);
340340
$this->assertTrue(
@@ -410,7 +410,7 @@ public function testUpdateDownloadableProductSamples()
410410
];
411411
$sampleData = $this->getSampleData();
412412

413-
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"] = null;
413+
unset($response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"]);
414414
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"] =
415415
[$updatedSample1Data, $sampleData['sample1'], $sampleData['sample2']];
416416

@@ -478,7 +478,7 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
478478
'sample_type' => 'file',
479479
];
480480

481-
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"] = null;
481+
unset($response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_links"]);
482482
$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"] =
483483
[$updatedSample1Data, $updatedSamp2e1Data];
484484

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_attribute_rollback.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121

2222
$registry->unregister('isSecureArea');
2323
$registry->register('isSecureArea', false);
24-

0 commit comments

Comments
 (0)