File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 19
19
* Test for \Magento\Catalog\Model\Product\Gallery\UpdateHandler.
20
20
*
21
21
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
22
+ * @magentoDataFixture Magento/Catalog/_files/product_image.php
22
23
*/
23
24
class UpdateHandlerTest extends \PHPUnit \Framework \TestCase
24
25
{
@@ -58,10 +59,7 @@ protected function setUp()
58
59
$ this ->updateHandler = $ this ->objectManager ->create (UpdateHandler::class);
59
60
$ this ->filesystem = $ this ->objectManager ->get (Filesystem::class);
60
61
$ this ->rootDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::ROOT );
61
-
62
- $ filePath = $ this ->rootDirectory ->getAbsolutePath ($ this ->fileName );
63
- $ file = fopen ($ filePath , "wb " );
64
- fwrite ($ file , 'Test ' );
62
+ $ this ->rootDirectory ->writeFile ($ this ->rootDirectory ->getAbsolutePath ($ this ->fileName ), 'Test ' );
65
63
}
66
64
67
65
/**
@@ -97,7 +95,6 @@ public function testExecuteWithIllegalFilename(): void
97
95
*/
98
96
protected function tearDown (): void
99
97
{
100
- parent ::tearDown ();
101
- unlink ($ this ->rootDirectory ->getAbsolutePath ($ this ->fileName ));
98
+ $ this ->rootDirectory ->getDriver ()->deleteFile ($ this ->rootDirectory ->getAbsolutePath ($ this ->fileName ));
102
99
}
103
100
}
You can’t perform that action at this time.
0 commit comments