Skip to content

Commit 67c4235

Browse files
committed
B2B-1876: New directories in pub/media do not get synced back to local filesystem from S3 Remote Storage
- Fix unit test failure
1 parent e2892b2 commit 67c4235

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

setup/src/Magento/Setup/Test/Unit/Console/Command/UpgradeCommandTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,18 @@ public function testExecute($options, $deployMode, $expectedString, $expectedOpt
112112
->method('installDataFixtures');
113113

114114
$this->assertSame(Cli::RETURN_SUCCESS, $this->commandTester->execute($options));
115-
$this->assertStringContainsString($expectedString, $this->commandTester->getDisplay());
115+
$this->assertEquals($expectedString, $this->commandTester->getDisplay());
116116
}
117117

118118
/**
119119
* @return array
120120
*/
121121
public function executeDataProvider()
122122
{
123+
$mediaGalleryNotice = "Media files stored outside of 'Media Gallery Allowed' folders will not be available "
124+
. "to the media gallery.\n"
125+
. "Please refer to Developer Guide for more details.\n";
126+
123127
return [
124128
[
125129
'options' => [
@@ -128,7 +132,7 @@ public function executeDataProvider()
128132
],
129133
'deployMode' => \Magento\Framework\App\State::MODE_PRODUCTION,
130134
'expectedString' => 'Please re-run Magento compile command. Use the command "setup:di:compile"'
131-
. PHP_EOL,
135+
. PHP_EOL . $mediaGalleryNotice,
132136
'expectedOptions' => [
133137
'keep-generated' => false,
134138
'convert-old-scripts' => false,
@@ -145,7 +149,7 @@ public function executeDataProvider()
145149
'--keep-generated' => true,
146150
],
147151
'deployMode' => \Magento\Framework\App\State::MODE_PRODUCTION,
148-
'expectedString' => '',
152+
'expectedString' => $mediaGalleryNotice,
149153
'expectedOptions' => [
150154
'keep-generated' => true,
151155
'convert-old-scripts' => false,
@@ -158,7 +162,7 @@ public function executeDataProvider()
158162
[
159163
'options' => ['--magento-init-params' => '', '--convert-old-scripts' => false],
160164
'deployMode' => \Magento\Framework\App\State::MODE_DEVELOPER,
161-
'expectedString' => '',
165+
'expectedString' => $mediaGalleryNotice,
162166
'expectedOptions' => [
163167
'keep-generated' => false,
164168
'convert-old-scripts' => false,
@@ -171,7 +175,7 @@ public function executeDataProvider()
171175
[
172176
'options' => ['--magento-init-params' => '', '--convert-old-scripts' => false],
173177
'deployMode' => \Magento\Framework\App\State::MODE_DEFAULT,
174-
'expectedString' => '',
178+
'expectedString' => $mediaGalleryNotice,
175179
'expectedOptions' => [
176180
'keep-generated' => false,
177181
'convert-old-scripts' => false,

0 commit comments

Comments
 (0)