From d81d25edbc1cfb8b8f5e0c39bbaf48ee28abe7e4 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@magento.com> Date: Wed, 6 Dec 2017 12:37:56 +0200 Subject: [PATCH] magento/magento2#11099 --- .../Catalog/Api/ProductCustomOptionRepositoryTest.php | 5 +++-- .../Catalog/Api/_files/product_options_update_negative.php | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) 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 b0dd2702f89..34588c9573f 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 08a14c2e7b2..d819fb5f604 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 ], ]; -- GitLab