diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php index db43cc535ca01c4bbac96e425a435bd71ef3fcef..ddf036fd18abb1cc0c964abf7685eeaed6208a0c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php @@ -17,6 +17,20 @@ use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; */ class Curl extends AbstractCurl implements CatalogProductAttributeInterface { + /** + * Relative action path with parameters. + * + * @var string + */ + protected $urlActionPath = 'catalog/product_attribute/save/back/edit'; + + /** + * Message for Exception when was received not successful response. + * + * @var string + */ + protected $responseExceptionMessage = 'Product Attribute creating by curl handler was not successful!'; + /** * Mapping values for data. * @@ -85,14 +99,15 @@ class Curl extends AbstractCurl implements CatalogProductAttributeInterface } $data = $this->changeStructureOfTheData($data); - $url = $_ENV['app_backend_url'] . 'catalog/product_attribute/save/back/edit'; + $url = $_ENV['app_backend_url'] . $this->urlActionPath; $curl = new BackendDecorator(new CurlTransport(), $this->_configuration); $curl->write($url, $data); $response = $curl->read(); $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { - throw new \Exception("Product Attribute creating by curl handler was not successful! \n" . $response); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception($this->responseExceptionMessage); } $resultData = [];