Skip to content

Commit 94006bd

Browse files
authored
Update ImageResizeCommandTest.php
test if order of tests changes behavior here.
1 parent 54a39d5 commit 94006bd

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

dev/tests/integration/testsuite/Magento/MediaStorage/Console/Command/ImageResizeCommandTest.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ protected function setUp(): void
6565
$this->filesystem = $this->objectManager->get(Filesystem::class);
6666
$this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
6767
}
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+
}
6882

6983
/**
7084
* Test that catalog:image:resize command executed successfully with missing image file
@@ -109,17 +123,4 @@ public function testExecuteWithZeroByteImage()
109123
$this->assertStringContainsString('Wrong file', $this->tester->getDisplay());
110124
$this->mediaDirectory->getDriver()->deleteFile($this->mediaDirectory->getAbsolutePath($this->fileName));
111125
}
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-
}
125126
}

0 commit comments

Comments
 (0)