Skip to content

Commit 81b2b7c

Browse files
author
Alex Paliarush
committed
MAGETWO-53431: [GITHUB] SOAP API Encoding Object has no 'label' property #4630
1 parent f86fa3f commit 81b2b7c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

app/code/Magento/Webapi/Controller/Soap/Request/Handler.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Webapi\Controller\Soap\Request;
77

8-
use Magento\Framework\Api\ExtensibleDataInterface;
9-
use Magento\Framework\Api\MetadataObjectInterface;
108
use Magento\Framework\Api\SimpleDataObjectConverter;
119
use Magento\Framework\Webapi\Authorization;
1210
use Magento\Framework\Exception\AuthorizationException;
@@ -157,7 +155,7 @@ protected function _prepareResponseData($data, $serviceClassName, $serviceMethod
157155
} elseif (is_array($data)) {
158156
$dataType = substr($dataType, 0, -2);
159157
foreach ($data as $key => $value) {
160-
if ($value instanceof ExtensibleDataInterface || $value instanceof MetadataObjectInterface) {
158+
if ($value instanceof $dataType) {
161159
$result[] = $this->_dataObjectConverter
162160
->convertKeysToCamelCase($this->_dataObjectProcessor->buildOutputDataArray($value, $dataType));
163161
} else {

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeOptionManagementInterfaceTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class ProductAttributeOptionManagementInterfaceTest extends WebapiAbstract
1717

1818
public function testGetItems()
1919
{
20-
$this->_markTestAsRestOnly('Fix inconsistencies in WSDL and Data interfaces');
2120
$testAttributeCode = 'quantity_and_stock_status';
2221
$expectedOptions = [
2322
[
@@ -54,7 +53,6 @@ public function testGetItems()
5453
*/
5554
public function testAdd($optionData)
5655
{
57-
$this->_markTestAsRestOnly('Fix inconsistencies in WSDL and Data interfaces');
5856
$testAttributeCode = 'select_attribute';
5957
$serviceInfo = [
6058
'rest' => [
@@ -100,6 +98,7 @@ public function addDataProvider()
10098
AttributeOptionLabelInterface::STORE_ID => 1,
10199
],
102100
],
101+
AttributeOptionInterface::VALUE => ''
103102
];
104103

105104
return [
@@ -121,7 +120,6 @@ public function addDataProvider()
121120
*/
122121
public function testDelete()
123122
{
124-
$this->_markTestAsRestOnly('Fix inconsistencies in WSDL and Data interfaces');
125123
$attributeCode = 'select_attribute';
126124
//get option Id
127125
$optionList = $this->getAttributeOptions($attributeCode);

0 commit comments

Comments
 (0)