Skip to content

Commit 218f3ab

Browse files
author
Prabhu Ram
committed
MC-29945: GraphQL Cart endpoint returns incorrect or different product images
- Fixed static failures
1 parent 928a1fa commit 218f3ab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testAddProductToCartWithImage()
126126
$this->assertEquals('11', $cartItem['prices']['price']['value']);
127127
$this->assertEquals($sku, $cartItem['product']['sku']);
128128
$expectedImageRegex = '/^https?:\/\/.+magento_image(_[0-9]+)?.jpg$/';
129-
$this->assertRegExp($expectedImageRegex, $cartItem['product']['image']['url']);
129+
$this->assertMatchesRegularExpression($expectedImageRegex, $cartItem['product']['image']['url']);
130130
}
131131

132132
/**

dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_no_options.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
use Magento\TestFramework\Workaround\Override\Fixture\Resolver;
67

7-
require __DIR__ . '/product_image.php';
8-
require __DIR__ . '/product_simple_without_custom_options.php';
8+
Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/product_image.php');
9+
Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/product_simple_without_custom_options.php');
910

1011
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
1112
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);

0 commit comments

Comments
 (0)