Skip to content

Commit 93f0034

Browse files
author
Bohdan Korablov
committed
MAGETWO-89315: Magento application compatible with cloud
1 parent 89597c6 commit 93f0034

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/internal/Magento/Framework/Setup/FilePermissions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getInstallationWritableDirectories()
9696
DirectoryList::MEDIA,
9797
DirectoryList::STATIC_VIEW,
9898
];
99-
if ($this->state->getMode() !== State::MODE_PRODUCTION) {
99+
if (PHP_SAPI !== 'cli' || $this->state->getMode() !== State::MODE_PRODUCTION) {
100100
$data[] = DirectoryList::GENERATED;
101101
}
102102
foreach ($data as $code) {

setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,20 @@ public function testDetach()
4848

4949
public function testOnBootstrap()
5050
{
51+
$omProvider = $this->getMockBuilder(\Magento\Setup\Model\ObjectManagerProvider::class)
52+
->disableOriginalConstructor()
53+
->getMock();
5154
/** @var \Zend\Mvc\MvcEvent|\PHPUnit_Framework_MockObject_MockObject $mvcEvent */
5255
$mvcEvent = $this->createMock(\Zend\Mvc\MvcEvent::class);
5356
$mvcApplication = $this->getMockBuilder(\Zend\Mvc\Application::class)->disableOriginalConstructor()->getMock();
5457
$mvcEvent->expects($this->once())->method('getApplication')->willReturn($mvcApplication);
5558
$serviceManager = $this->createMock(\Zend\ServiceManager\ServiceManager::class);
5659
$initParams[AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS][DirectoryList::ROOT] = ['path' => '/test'];
57-
$serviceManager->expects($this->once())->method('get')
58-
->willReturn($initParams);
60+
$serviceManager->expects($this->any())->method('get')
61+
->willReturnMap([
62+
[InitParamListener::BOOTSTRAP_PARAM, true, $initParams],
63+
[\Magento\Setup\Model\ObjectManagerProvider::class, true, $omProvider],
64+
]);
5965
$serviceManager->expects($this->exactly(2))->method('setService')
6066
->withConsecutive(
6167
[

0 commit comments

Comments
 (0)