@@ -65,6 +65,20 @@ protected function setUp(): void
65
65
$ this ->filesystem = $ this ->objectManager ->get (Filesystem::class);
66
66
$ this ->mediaDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
67
67
}
68
+
69
+
70
+ /**
71
+ * Test that catalog:image:resize command executes successfully in database storage mode
72
+ * with file missing from local folder
73
+ *
74
+ * @magentoDataFixture Magento/MediaStorage/_files/database_mode.php
75
+ * @magentoDataFixture Magento/MediaStorage/_files/product_with_missed_image.php
76
+ */
77
+ public function testDatabaseStorageMissingFile ()
78
+ {
79
+ $ this ->tester ->execute ([]);
80
+ $ this ->assertStringContainsString ('Product images resized successfully ' , $ this ->tester ->getDisplay ());
81
+ }
68
82
69
83
/**
70
84
* Test that catalog:image:resize command executed successfully with missing image file
@@ -109,17 +123,4 @@ public function testExecuteWithZeroByteImage()
109
123
$ this ->assertStringContainsString ('Wrong file ' , $ this ->tester ->getDisplay ());
110
124
$ this ->mediaDirectory ->getDriver ()->deleteFile ($ this ->mediaDirectory ->getAbsolutePath ($ this ->fileName ));
111
125
}
112
-
113
- /**
114
- * Test that catalog:image:resize command executes successfully in database storage mode
115
- * with file missing from local folder
116
- *
117
- * @magentoDataFixture Magento/MediaStorage/_files/database_mode.php
118
- * @magentoDataFixture Magento/MediaStorage/_files/product_with_missed_image.php
119
- */
120
- public function testDatabaseStorageMissingFile ()
121
- {
122
- $ this ->tester ->execute ([]);
123
- $ this ->assertStringContainsString ('Product images resized successfully ' , $ this ->tester ->getDisplay ());
124
- }
125
126
}
0 commit comments