File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,8 @@ public function testCategoryImageName()
415
415
$ categoryList = $ response ['categoryList ' ];
416
416
$ this ->assertArrayNotHasKey ('errors ' , $ response );
417
417
$ this ->assertNotEmpty ($ response ['categoryList ' ]);
418
+ $ expectedImageUrl = str_replace ('index.php ' , '' , $ expectedImageUrl );
419
+ $ categoryList [0 ]['name ' ] = str_replace ('index.php ' , '' , $ categoryList [0 ]['name ' ]);
418
420
$ this ->assertEquals ('Parent Image Category ' , $ categoryList [0 ]['name ' ]);
419
421
$ this ->assertEquals ($ expectedImageUrl , $ categoryList [0 ]['image ' ]);
420
422
}
Original file line number Diff line number Diff line change @@ -638,13 +638,16 @@ public function testCategoryImage(?string $imagePrefix)
638
638
$ categoryList = $ response ['categoryList ' ];
639
639
$ storeBaseUrl = $ this ->objectManager ->get (StoreManagerInterface::class)->getStore ()->getBaseUrl ('media ' );
640
640
$ expectedImageUrl = rtrim ($ storeBaseUrl , '/ ' ) . '/ ' . ltrim ($ categoryModel ->getImage (), '/ ' );
641
+ $ expectedImageUrl = str_replace ('index.php ' , '' , $ expectedImageUrl );
641
642
642
643
$ this ->assertEquals ($ categoryId , $ categoryList [0 ]['id ' ]);
643
644
$ this ->assertEquals ('Parent Image Category ' , $ categoryList [0 ]['name ' ]);
645
+ $ categoryList [0 ]['image ' ] = str_replace ('index.php ' , '' , $ categoryList [0 ]['image ' ]);
644
646
$ this ->assertEquals ($ expectedImageUrl , $ categoryList [0 ]['image ' ]);
645
647
646
648
$ childCategory = $ categoryList [0 ]['children ' ][0 ];
647
649
$ this ->assertEquals ('Child Image Category ' , $ childCategory ['name ' ]);
650
+ $ childCategory ['image ' ] = str_replace ('index.php ' , '' , $ childCategory ['image ' ]);
648
651
$ this ->assertEquals ($ expectedImageUrl , $ childCategory ['image ' ]);
649
652
}
650
653
You can’t perform that action at this time.
0 commit comments