Skip to content

Commit add6651

Browse files
author
Vitaliy Boyko
committed
MAGETWO-24676: fixed exception message
1 parent ae2e92b commit add6651

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/ConfigurableProductGraphQl/Model/Cart/BuyRequest/SuperAttributeDataProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function execute(array $cartItemData): array
7979
}
8080
$configurableProductLinks = $parentProduct->getExtensionAttributes()->getConfigurableProductLinks();
8181
if (!in_array($product->getId(), $configurableProductLinks)) {
82-
throw new GraphQlInputException(__('The child product do not belong to the parent product.'));
82+
throw new GraphQlInputException(__('Could not find specified product.'));
8383
}
8484
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
8585
$this->optionCollection->addProductId((int)$parentProduct->getData($linkField));

dev/tests/api-functional/testsuite/Magento/GraphQl/ConfigurableProduct/AddConfigurableProductToCartTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function testAddMultipleConfigurableProductToCart()
145145
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
146146
*
147147
* @expectedException Exception
148-
* @expectedExceptionMessage The child product do not belong to the parent product.
148+
* @expectedExceptionMessage Could not find specified product.
149149
*/
150150
public function testAddVariationFromAnotherConfigurableProductWithTheSameSuperAttributeToCart()
151151
{
@@ -173,7 +173,7 @@ public function testAddVariationFromAnotherConfigurableProductWithTheSameSuperAt
173173
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
174174
*
175175
* @expectedException Exception
176-
* @expectedExceptionMessage The child product do not belong to the parent product.
176+
* @expectedExceptionMessage Could not find specified product.
177177
*/
178178
public function testAddVariationFromAnotherConfigurableProductWithDifferentSuperAttributeToCart()
179179
{

0 commit comments

Comments
 (0)