Skip to content

Commit d81d25e

Browse files
author
Stanislav Idolov
committed
1 parent 02a09d6 commit d81d25e

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
@@ -391,8 +391,9 @@ public function validOptionDataProvider()
391391
* @dataProvider optionNegativeUpdateDataProvider
392392
* @param array $optionData
393393
* @param string $message
394+
* @param int $exceptionCode
394395
*/
395-
public function testUpdateNegative($optionData, $message)
396+
public function testUpdateNegative($optionData, $message, $exceptionCode)
396397
{
397398
$this->_markTestAsRestOnly();
398399
$productSku = 'simple';
@@ -411,7 +412,7 @@ public function testUpdateNegative($optionData, $message)
411412

412413
$this->expectException('Exception');
413414
$this->expectExceptionMessage($message);
414-
$this->expectExceptionCode(400);
415+
$this->expectExceptionCode($exceptionCode);
415416
$this->_webApiCall($serviceInfo, ['option' => $optionData]);
416417
}
417418

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
'ProductSku should be specified',
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
'Requested product doesn\'t exist',
33+
404
3234
],
3335
];

0 commit comments

Comments
 (0)