Skip to content

Commit 6bd0a74

Browse files
committed
B2B-1785: Cannot enable remote storage with install command when modules are not enabled
1 parent 11724e6 commit 6bd0a74

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

setup/src/Magento/Setup/Test/Unit/Model/InstallerTest.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
use PHPUnit\Framework\MockObject\MockObject;
5555
use PHPUnit\Framework\TestCase;
5656
use Magento\Setup\Model\SearchConfig;
57+
use Magento\RemoteStorage\Setup\ConfigOptionsList as FileStorageValidator;
5758

5859
/**
5960
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -107,11 +108,6 @@ class InstallerTest extends TestCase
107108
*/
108109
private $moduleLoader;
109110

110-
/**
111-
* @var DirectoryList|MockObject
112-
*/
113-
private $directoryList;
114-
115111
/**
116112
* @var AdminAccountFactory|MockObject
117113
*/
@@ -123,12 +119,7 @@ class InstallerTest extends TestCase
123119
private $logger;
124120

125121
/**
126-
* @var Random|MockObject
127-
*/
128-
private $random;
129-
130-
/**
131-
* @var MockObject
122+
* @var AdapterInterface|MockObject
132123
*/
133124
private $connection;
134125

@@ -188,7 +179,7 @@ class InstallerTest extends TestCase
188179
private $phpReadinessCheck;
189180

190181
/**
191-
* @var \Magento\Framework\Setup\DeclarationInstaller|MockObject
182+
* @var DeclarationInstaller|MockObject
192183
*/
193184
private $declarationInstallerMock;
194185

@@ -365,6 +356,11 @@ public function testInstall(array $request, array $logMessages)
365356
->with(Area::AREA_GLOBAL);
366357
$registry = $this->createMock(Registry::class);
367358
$searchConfigMock = $this->getMockBuilder(SearchConfig::class)->disableOriginalConstructor()->getMock();
359+
360+
$fileStorageValidatorMock = $this->getMockBuilder(FileStorageValidator::class)
361+
->disableOriginalConstructor()
362+
->getMock();
363+
368364
$this->setupFactory->expects($this->atLeastOnce())->method('create')->with($resource)->willReturn($setup);
369365
$this->dataSetupFactory->expects($this->atLeastOnce())->method('create')->willReturn($dataSetup);
370366
$this->objectManager->expects($this->any())
@@ -397,7 +393,8 @@ public function testInstall(array $request, array $logMessages)
397393
[Manager::class, $cacheManager],
398394
[DeclarationInstaller::class, $this->declarationInstallerMock],
399395
[Registry::class, $registry],
400-
[SearchConfig::class, $searchConfigMock]
396+
[SearchConfig::class, $searchConfigMock],
397+
[FileStorageValidator::class, $fileStorageValidatorMock],
401398
]);
402399
$this->adminFactory->expects($this->any())->method('create')->willReturn(
403400
$this->createMock(AdminAccount::class)
@@ -452,6 +449,7 @@ public function installDataProvider()
452449
['Module \'Foo_One\':'],
453450
['Module \'Bar_Two\':'],
454451
['Installing search configuration...'],
452+
['Validating file storage configuration...'],
455453
['Installing user configuration...'],
456454
['Enabling caches:'],
457455
['Current status:'],
@@ -503,6 +501,7 @@ public function installDataProvider()
503501
['Module \'Foo_One\':'],
504502
['Module \'Bar_Two\':'],
505503
['Installing search configuration...'],
504+
['Validating file storage configuration...'],
506505
['Installing user configuration...'],
507506
['Enabling caches:'],
508507
['Current status:'],

0 commit comments

Comments
 (0)