Skip to content

Commit 535add7

Browse files
committed
B2B-2022:[AWS S3] [Integration Tests]: Investigate Test Failures in Catalog module
- Added review fix
1 parent ee6eff9 commit 535add7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/UpdateHandlerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ public function testDeleteWithMultiWebsites(): void
515515
$this->assertNotEmpty($product->getMediaGalleryEntries());
516516
$image = $product->getImage();
517517
$path = $this->mediaDirectory->getAbsolutePath($this->config->getBaseMediaPath() . $image);
518-
$this->mediaDirectory->isExist($path);
518+
$this->assertTrue($this->mediaDirectory->isExist($path));
519519
// Assign product to default and second website and save changes
520520
$product->setWebsiteIds([$defaultWebsiteId, $secondWebsiteId]);
521521
$this->productRepository->save($product);
@@ -548,7 +548,7 @@ public function testDeleteWithMultiWebsites(): void
548548
$product = $this->getProduct($globalScopeId);
549549
// Assert that image was not deleted as it has roles in second store
550550
$this->assertNotEmpty($product->getMediaGalleryEntries());
551-
$this->mediaDirectory->isExist($path);
551+
$this->assertTrue($this->mediaDirectory->isExist($path));
552552
// Unlink second website, delete existing images and save changes
553553
$product->setWebsiteIds([$defaultWebsiteId]);
554554
$product->setMediaGalleryEntries([]);
@@ -592,7 +592,7 @@ public function testUpdateImage(string $newFile, string $expectedFile, bool $exi
592592
$this->assertEquals($oldImage['file'], $product->getThumbnail());
593593
$path = $this->mediaDirectory->getAbsolutePath($this->config->getBaseMediaPath() . $oldImage['file']);
594594
$tmpPath = $this->mediaDirectory->getAbsolutePath($this->config->getBaseTmpMediaPath() . $oldImage['file']);
595-
$this->mediaDirectory->isExist($path);
595+
$this->assertTrue($this->mediaDirectory->isExist($path));
596596
$this->mediaDirectory->getDriver()->copy($path, $tmpPath);
597597
if (!$exist) {
598598
$this->mediaDirectory->getDriver()->deleteFile($path);
@@ -625,7 +625,7 @@ public function testUpdateImage(string $newFile, string $expectedFile, bool $exi
625625
$this->assertEquals($newImageRoles['thumbnail'], $product->getThumbnail());
626626
$path = $this->mediaDirectory->getAbsolutePath($this->config->getBaseMediaPath() . $product->getImage());
627627
// Assert that the image exists on disk.
628-
$this->mediaDirectory->isExist($path);
628+
$this->assertTrue($this->mediaDirectory->isExist($path));
629629
}
630630

631631
/**

0 commit comments

Comments
 (0)