Skip to content

Commit 999e372

Browse files
Igor Melnikovvrann
authored andcommitted
MAGETWO-51592: Make single tenant compiler work when Magento not installed
Changing messages
1 parent edb748f commit 999e372

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

setup/src/Magento/Setup/Console/Command/AbstractModuleCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ protected function cleanup(InputInterface $input, OutputInterface $output)
8484
/** @var \Magento\Framework\App\State\CleanupFiles $cleanupFiles */
8585
$cleanupFiles = $this->objectManager->get('Magento\Framework\App\State\CleanupFiles');
8686
$cleanupFiles->clearCodeGeneratedClasses();
87-
$output->writeln('<info>Generated classes cleared successfully. Please re-run Magento compile command</info>');
87+
$output->writeln("<info>Generated classes cleared successfully. Please run 'setup:di:compile' command to "
88+
. 'generate classes.</info>');
8889
if ($input->getOption(self::INPUT_KEY_CLEAR_STATIC_CONTENT)) {
8990
$cleanupFiles->clearMaterializedViewFiles();
90-
$output->writeln('<info>Generated static view files cleared successfully. You should compile classes now '
91-
. 'using magento \'setup:di:compile\'.</info>');
91+
$output->writeln('<info>Generated static view files cleared successfully.</info>');
9292
} else {
9393
$output->writeln(
94-
'<info>Info: Some modules might require static view files to be cleared. To do this, run magento '
95-
. '\'module:enable\' with --' . self::INPUT_KEY_CLEAR_STATIC_CONTENT
94+
"<info>Info: Some modules might require static view files to be cleared. To do this, run '"
95+
. $this->getName() . "' with --" . self::INPUT_KEY_CLEAR_STATIC_CONTENT
9696
. ' option to clear them.</info>'
9797
);
9898
}

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ class ModuleEnableDisableCommandTest extends \PHPUnit_Framework_TestCase
4343

4444
protected function setUp()
4545
{
46-
$this->objectManagerProviderMock = $this->getMock('Magento\Setup\Model\ObjectManagerProvider', [], [], '', false);
46+
$this->objectManagerProviderMock = $this->getMock(
47+
'Magento\Setup\Model\ObjectManagerProvider',
48+
[],
49+
[],
50+
'',
51+
false
52+
);
4753
$objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManagerInterface');
4854
$this->objectManagerProviderMock->expects($this->any())
4955
->method('get')
@@ -108,13 +114,15 @@ public function executeDataProvider()
108114
true,
109115
false,
110116
'%amodules have been enabled%aMagento_Module1%a'
111-
. 'Info: Some modules might require static view files to be cleared.%a'
117+
. "Info: Some modules might require static view files to be cleared. To do this, run "
118+
. "'module:enable' with --clear-static-content%a"
112119
],
113120
'disable, do not clear static content' => [
114121
false,
115122
false,
116123
'%amodules have been disabled%aMagento_Module1%a'
117-
. 'Info: Some modules might require static view files to be cleared.%a'
124+
. "Info: Some modules might require static view files to be cleared. To do this, run "
125+
. "'module:disable' with --clear-static-content%a"
118126
],
119127
'enable, clear static content' => [
120128
true,

0 commit comments

Comments
 (0)