Skip to content

Commit a205337

Browse files
Stanislav IdolovMastiuhin Oleksandr
Stanislav Idolov
authored and
Mastiuhin Oleksandr
committed
(cherry picked from commit d81d25e)
1 parent 0d912e6 commit a205337

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,9 @@ public function validOptionDataProvider()
389389
* @dataProvider optionNegativeUpdateDataProvider
390390
* @param array $optionData
391391
* @param string $message
392+
* @param int $exceptionCode
392393
*/
393-
public function testUpdateNegative($optionData, $message)
394+
public function testUpdateNegative($optionData, $message, $exceptionCode)
394395
{
395396
$this->_markTestAsRestOnly();
396397
$productSku = 'simple';
@@ -409,7 +410,7 @@ public function testUpdateNegative($optionData, $message)
409410

410411
$this->expectException('Exception');
411412
$this->expectExceptionMessage($message);
412-
$this->expectExceptionCode(400);
413+
$this->expectExceptionCode($exceptionCode);
413414
$this->_webApiCall($serviceInfo, ['option' => $optionData]);
414415
}
415416

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
'max_characters' => 10,
1717
],
1818
'The ProductSku is empty. Set the ProductSku and try again.',
19+
400
1920
],
2021
'invalid_product_sku' => [
2122
[
@@ -25,9 +26,10 @@
2526
'is_require' => 1,
2627
'price' => 10.0,
2728
'price_type' => 'fixed',
28-
'sku' => 'sku1',
29+
'product_sku' => 'sku1',
2930
'max_characters' => 10,
3031
],
3132
"The product that was requested doesn't exist. Verify the product and try again.",
33+
404
3234
],
3335
];

0 commit comments

Comments
 (0)