Skip to content

Commit d1132da

Browse files
committed
MAGETWO-35056: Merge and Fix tests
- Fix api-functional SOAP tests
1 parent c388702 commit d1132da

10 files changed

+21
-21
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testDelete()
121121
];
122122
$result = $this->_webApiCall(
123123
$serviceInfo,
124-
['productSku' => 'simple', 'categoryId' => $this->categoryId]
124+
['sku' => 'simple', 'categoryId' => $this->categoryId]
125125
);
126126
$this->assertTrue($result);
127127
$this->assertFalse($this->isProductInCategory($this->categoryId, 333, 10));

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testRemove()
5555
'operation' => self::SERVICE_NAME . 'DeleteByIdentifier',
5656
],
5757
];
58-
$this->assertTrue($this->_webApiCall($serviceInfo, ['productSku' => $sku, 'optionId' => $optionId]));
58+
$this->assertTrue($this->_webApiCall($serviceInfo, ['sku' => $sku, 'optionId' => $optionId]));
5959
/** @var \Magento\Catalog\Model\Product $product */
6060
$product = $this->objectManager->create('Magento\Catalog\Model\Product');
6161
$product->load(1);
@@ -87,7 +87,7 @@ public function testGet()
8787
'operation' => self::SERVICE_NAME . 'Get',
8888
],
8989
];
90-
$option = $this->_webApiCall($serviceInfo, ['productSku' => $productSku, 'optionId' => $optionId]);
90+
$option = $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'optionId' => $optionId]);
9191
unset($option['product_sku']);
9292
unset($option['option_id']);
9393
$excepted = include '_files/product_options.php';
@@ -113,7 +113,7 @@ public function testGetList()
113113
'operation' => self::SERVICE_NAME . 'GetList',
114114
],
115115
];
116-
$options = $this->_webApiCall($serviceInfo, ['productSku' => $productSku]);
116+
$options = $this->_webApiCall($serviceInfo, ['sku' => $productSku]);
117117

118118
/** Unset dynamic data */
119119
foreach ($options as $key => $value) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testGetList()
3232
'operation' => self::SERVICE_NAME . 'GetList',
3333
],
3434
];
35-
$groupPriceList = $this->_webApiCall($serviceInfo, ['productSku' => $productSku]);
35+
$groupPriceList = $this->_webApiCall($serviceInfo, ['sku' => $productSku]);
3636
$this->assertCount(2, $groupPriceList);
3737
$this->assertEquals(9, $groupPriceList[0]['value']);
3838
$this->assertEquals(7, $groupPriceList[1]['value']);
@@ -56,7 +56,7 @@ public function testDelete()
5656
'operation' => self::SERVICE_NAME . 'Remove',
5757
],
5858
];
59-
$requestData = ['productSku' => $productSku, 'customerGroupId' => $customerGroupId];
59+
$requestData = ['sku' => $productSku, 'customerGroupId' => $customerGroupId];
6060
$this->assertTrue($this->_webApiCall($serviceInfo, $requestData));
6161
}
6262

@@ -77,7 +77,7 @@ public function testAdd()
7777
'operation' => self::SERVICE_NAME . 'Add',
7878
],
7979
];
80-
$this->_webApiCall($serviceInfo, ['productSku' => $productSku, 'customerGroupId' => 1, 'price' => 10]);
80+
$this->_webApiCall($serviceInfo, ['sku' => $productSku, 'customerGroupId' => 1, 'price' => 10]);
8181
$objectManager = \Magento\TestFramework\ObjectManager::getInstance();
8282
/** @var \Magento\Catalog\Api\ProductGroupPriceManagementInterface $service */
8383
$service = $objectManager->get('Magento\Catalog\Api\ProductGroupPriceManagementInterface');
@@ -106,7 +106,7 @@ public function testAddForDifferentWebsite()
106106
],
107107

108108
];
109-
$this->_webApiCall($serviceInfo, ['productSku' => $productSku, 'customerGroupId' => 1, 'price' => 10]);
109+
$this->_webApiCall($serviceInfo, ['sku' => $productSku, 'customerGroupId' => 1, 'price' => 10]);
110110
$objectManager = \Magento\TestFramework\ObjectManager::getInstance();
111111
/** @var \Magento\Catalog\Api\ProductGroupPriceManagementInterface $service */
112112
$service = $objectManager->get('Magento\Catalog\Api\ProductGroupPriceManagementInterface');

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function assertLinkedProducts($productSku, $linkType)
7676
],
7777
];
7878

79-
$actual = $this->_webApiCall($serviceInfo, ['productSku' => $productSku, 'type' => $linkType]);
79+
$actual = $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'type' => $linkType]);
8080

8181
$this->assertEquals('simple', $actual[0]['linked_product_type']);
8282
$this->assertEquals('simple', $actual[0]['linked_product_sku']);
@@ -112,7 +112,7 @@ public function testAssign()
112112
];
113113

114114
$arguments = [
115-
'productSku' => $productSku,
115+
'sku' => $productSku,
116116
'items' => [$linkData],
117117
'type' => $linkType,
118118
];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testDelete()
4747
],
4848
],
4949
[
50-
'productSku' => $productSku,
50+
'sku' => $productSku,
5151
'type' => $linkType,
5252
'linkedProductSku' => $linkedSku
5353
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,6 @@ protected function deleteProduct($sku)
274274
];
275275

276276
return (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) ?
277-
$this->_webApiCall($serviceInfo, ['productSku' => $sku]) : $this->_webApiCall($serviceInfo);
277+
$this->_webApiCall($serviceInfo, ['sku' => $sku]) : $this->_webApiCall($serviceInfo);
278278
}
279279
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function testGetMultiStore()
7373
]
7474
];
7575

76-
$requestData = ['id' => $sku, 'productSku' => $sku];
76+
$requestData = ['id' => $sku, 'sku' => $sku];
7777
$defaultStoreResponse = $this->_webApiCall($serviceInfo, $requestData);
7878
$nameInDefaultStore = 'Simple Product';
7979
$this->assertEquals(

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testGetList($customerGroupId, $count, $value, $qty)
3838

3939
$groupPriceList = $this->_webApiCall(
4040
$serviceInfo,
41-
['productSku' => $productSku, 'customerGroupId' => $customerGroupId]
41+
['sku' => $productSku, 'customerGroupId' => $customerGroupId]
4242
);
4343

4444
$this->assertCount($count, $groupPriceList);
@@ -78,7 +78,7 @@ public function testDelete($customerGroupId, $qty)
7878
'operation' => self::SERVICE_NAME . 'Remove',
7979
],
8080
];
81-
$requestData = ['productSku' => $productSku, 'customerGroupId' => $customerGroupId, 'qty' => $qty];
81+
$requestData = ['sku' => $productSku, 'customerGroupId' => $customerGroupId, 'qty' => $qty];
8282
$this->assertTrue($this->_webApiCall($serviceInfo, $requestData));
8383
}
8484

@@ -114,7 +114,7 @@ public function testAdd()
114114
];
115115

116116
$requestData = [
117-
'productSku' => $productSku,
117+
'sku' => $productSku,
118118
'customerGroupId' => $customerGroupId,
119119
'qty' => $qty,
120120
'price' => $price,
@@ -152,7 +152,7 @@ public function testAddWithAllCustomerGrouped()
152152
],
153153
];
154154
$requestData = [
155-
'productSku' => $productSku,
155+
'sku' => $productSku,
156156
'customerGroupId' => $customerGroupId,
157157
'qty' => $qty,
158158
'price' => $price,
@@ -190,7 +190,7 @@ public function testUpdateWithAllGroups()
190190
],
191191
];
192192
$requestData = [
193-
'productSku' => $productSku,
193+
'sku' => $productSku,
194194
'customerGroupId' => $customerGroupId,
195195
'qty' => $qty,
196196
'price' => $price,

dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private function delete($productSku, $optionId)
244244
'operation' => self::SERVICE_NAME . 'DeleteById'
245245
]
246246
];
247-
return $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'optionId' => $optionId]);
247+
return $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'id' => $optionId]);
248248
}
249249

250250
/**
@@ -265,7 +265,7 @@ protected function get($productSku, $optionId)
265265
'operation' => self::SERVICE_NAME . 'Get'
266266
]
267267
];
268-
return $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'optionId' => $optionId]);
268+
return $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'id' => $optionId]);
269269
}
270270

271271
/**

dev/tests/api-functional/testsuite/Magento/GroupedProduct/Api/ProductLinkManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testGetLinkedItemsByType()
3232
],
3333
];
3434

35-
$actual = $this->_webApiCall($serviceInfo, ['productSku' => $productSku, 'type' => $linkType]);
35+
$actual = $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'type' => $linkType]);
3636

3737
$expected = [
3838
[

0 commit comments

Comments
 (0)