diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php index b0dd2702f89be4e7fb2a449e7103b53311e141cc..34588c9573f984ebd58ccd2e25581419b55c598e 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductCustomOptionRepositoryTest.php @@ -391,8 +391,9 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract * @dataProvider optionNegativeUpdateDataProvider * @param array $optionData * @param string $message + * @param int $exceptionCode */ - public function testUpdateNegative($optionData, $message) + public function testUpdateNegative($optionData, $message, $exceptionCode) { $this->_markTestAsRestOnly(); $productSku = 'simple'; @@ -411,7 +412,7 @@ class ProductCustomOptionRepositoryTest extends WebapiAbstract $this->expectException('Exception'); $this->expectExceptionMessage($message); - $this->expectExceptionCode(400); + $this->expectExceptionCode($exceptionCode); $this->_webApiCall($serviceInfo, ['option' => $optionData]); } diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/_files/product_options_update_negative.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/_files/product_options_update_negative.php index 08a14c2e7b261b1dc7c9c774a88eb494f4509bf6..d819fb5f604bf04c3c8827c6a5a69a0068f59a96 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/_files/product_options_update_negative.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/_files/product_options_update_negative.php @@ -16,6 +16,7 @@ return [ 'max_characters' => 10, ], 'ProductSku should be specified', + 400 ], 'invalid_product_sku' => [ [ @@ -25,9 +26,10 @@ return [ 'is_require' => 1, 'price' => 10.0, 'price_type' => 'fixed', - 'sku' => 'sku1', + 'product_sku' => 'sku1', 'max_characters' => 10, ], 'Requested product doesn\'t exist', + 404 ], ];