Skip to content

Commit 5bf4ef4

Browse files
committed
Merge remote-tracking branch 'origin/BUG#AC-1247' into GL_PR_21102021
2 parents d2995d0 + 6d28ce5 commit 5bf4ef4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

dev/tests/integration/testsuite/Magento/Setup/Console/Command/DeployStaticContentCommandTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\Deploy\Console\DeployStaticOptions;
99
use Magento\Framework\App\DeploymentConfig\FileReader;
1010
use Magento\Framework\App\DeploymentConfig\Writer;
11+
use Magento\Framework\App\DeploymentConfig\Writer\PhpFormatter;
1112
use Magento\Framework\App\Filesystem\DirectoryList;
1213
use Magento\Framework\Config\File\ConfigFilePool;
1314
use Magento\Framework\Console\Cli;
@@ -70,6 +71,11 @@ class DeployStaticContentCommandTest extends \PHPUnit\Framework\TestCase
7071
*/
7172
private $storeManager;
7273

74+
/**
75+
* @var PhpFormatter
76+
*/
77+
private $phpFormatter;
78+
7379
/**
7480
* @inheritdoc
7581
*/
@@ -81,7 +87,7 @@ protected function setUp(): void
8187
$this->filesystem = $this->objectManager->get(Filesystem::class);
8288
$this->configFilePool = $this->objectManager->get(ConfigFilePool::class);
8389
$this->storeManager = $this->objectManager->get(StoreManagerInterface::class);
84-
90+
$this->phpFormatter = $this->objectManager->get(PhpFormatter::class);
8591
$this->config = $this->loadConfig();
8692
$this->envConfig = $this->loadEnvConfig();
8793

@@ -129,10 +135,10 @@ public function testDeployStaticWithoutDbConnection()
129135
);
130136
$this->writer->saveConfig([ConfigFilePool::APP_CONFIG => $newData], true);
131137

132-
// remove application environment config for emulate work without db
138+
// rewrite application environment config with only remote storage details to emulate work without db
133139
$this->filesystem->getDirectoryWrite(DirectoryList::CONFIG)->writeFile(
134140
$this->configFilePool->getPath(ConfigFilePool::APP_ENV),
135-
"<?php\n return [];\n"
141+
$this->phpFormatter->format(['remote_storage' => $this->envConfig['remote_storage']])
136142
);
137143
$this->storeManager->reinitStores();
138144

0 commit comments

Comments
 (0)