@@ -515,7 +515,7 @@ public function testDeleteWithMultiWebsites(): void
515
515
$ this ->assertNotEmpty ($ product ->getMediaGalleryEntries ());
516
516
$ image = $ product ->getImage ();
517
517
$ path = $ this ->mediaDirectory ->getAbsolutePath ($ this ->config ->getBaseMediaPath () . $ image );
518
- $ this ->mediaDirectory ->isExist ($ path );
518
+ $ this ->assertTrue ( $ this -> mediaDirectory ->isExist ($ path) );
519
519
// Assign product to default and second website and save changes
520
520
$ product ->setWebsiteIds ([$ defaultWebsiteId , $ secondWebsiteId ]);
521
521
$ this ->productRepository ->save ($ product );
@@ -548,7 +548,7 @@ public function testDeleteWithMultiWebsites(): void
548
548
$ product = $ this ->getProduct ($ globalScopeId );
549
549
// Assert that image was not deleted as it has roles in second store
550
550
$ this ->assertNotEmpty ($ product ->getMediaGalleryEntries ());
551
- $ this ->mediaDirectory ->isExist ($ path );
551
+ $ this ->assertTrue ( $ this -> mediaDirectory ->isExist ($ path) );
552
552
// Unlink second website, delete existing images and save changes
553
553
$ product ->setWebsiteIds ([$ defaultWebsiteId ]);
554
554
$ product ->setMediaGalleryEntries ([]);
@@ -592,7 +592,7 @@ public function testUpdateImage(string $newFile, string $expectedFile, bool $exi
592
592
$ this ->assertEquals ($ oldImage ['file ' ], $ product ->getThumbnail ());
593
593
$ path = $ this ->mediaDirectory ->getAbsolutePath ($ this ->config ->getBaseMediaPath () . $ oldImage ['file ' ]);
594
594
$ tmpPath = $ this ->mediaDirectory ->getAbsolutePath ($ this ->config ->getBaseTmpMediaPath () . $ oldImage ['file ' ]);
595
- $ this ->mediaDirectory ->isExist ($ path );
595
+ $ this ->assertTrue ( $ this -> mediaDirectory ->isExist ($ path) );
596
596
$ this ->mediaDirectory ->getDriver ()->copy ($ path , $ tmpPath );
597
597
if (!$ exist ) {
598
598
$ this ->mediaDirectory ->getDriver ()->deleteFile ($ path );
@@ -625,7 +625,7 @@ public function testUpdateImage(string $newFile, string $expectedFile, bool $exi
625
625
$ this ->assertEquals ($ newImageRoles ['thumbnail ' ], $ product ->getThumbnail ());
626
626
$ path = $ this ->mediaDirectory ->getAbsolutePath ($ this ->config ->getBaseMediaPath () . $ product ->getImage ());
627
627
// Assert that the image exists on disk.
628
- $ this ->mediaDirectory ->isExist ($ path );
628
+ $ this ->assertTrue ( $ this -> mediaDirectory ->isExist ($ path) );
629
629
}
630
630
631
631
/**
0 commit comments