Skip to content

Commit 8820171

Browse files
committed
MC-15991: Category image return only image name
- fix test
1 parent 6f14e00 commit 8820171

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,13 @@ public function testCategoryImage()
590590
$this->assertNotEmpty($response['category']);
591591
$category = $response['category'];
592592
$storeBaseUrl = $this->objectManager->get(StoreManagerInterface::class)->getStore()->getBaseUrl();
593-
$expectedImageUrl = rtrim($storeBaseUrl, '/') . '/' . ltrim($categoryModel->getImage(), '/');
593+
$expectedImageUrl = str_replace(
594+
'index.php',
595+
'pub/media',
596+
rtrim($storeBaseUrl, '/')
597+
)
598+
. '/'
599+
. ltrim($categoryModel->getImage(), '/');
594600

595601
$this->assertEquals($categoryId, $category['id']);
596602
$this->assertEquals('Parent Image Category', $category['name']);

0 commit comments

Comments
 (0)