File tree Expand file tree Collapse file tree 4 files changed +39
-6
lines changed
framework/Magento/TestFramework/App
testsuite/Magento/Deploy/Console/Command
setup/src/Magento/Setup/Module/Di/App/Task/Operation Expand file tree Collapse file tree 4 files changed +39
-6
lines changed Original file line number Diff line number Diff line change 27
27
\Magento \Framework \App \Config \ScopeConfigInterface::class => \Magento \TestFramework \App \Config::class,
28
28
\Magento \Framework \Lock \Backend \Cache::class =>
29
29
\Magento \TestFramework \Lock \Backend \DummyLocker::class,
30
+ \Magento \Framework \ShellInterface::class => \Magento \TestFramework \App \Shell::class,
31
+ \Magento \Framework \App \Shell::class => \Magento \TestFramework \App \Shell::class,
30
32
];
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \TestFramework \App ;
7
+ /**
8
+ * Shell command line wrapper encapsulates command execution and arguments escaping
9
+ */
10
+ class Shell extends \Magento \Framework \App \Shell
11
+ {
12
+ /**
13
+ * @inheritdoc
14
+ */
15
+ public function execute ($ command , array $ arguments = [])
16
+ {
17
+ if (strpos ($ command , BP . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' ) !== false ) {
18
+ $ command = str_replace (
19
+ BP . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' ,
20
+ BP . DIRECTORY_SEPARATOR . 'dev ' . DIRECTORY_SEPARATOR . 'tests ' . DIRECTORY_SEPARATOR . 'integration '
21
+ . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' ,
22
+ $ command
23
+ );
24
+ }
25
+
26
+ $ params = \Magento \TestFramework \Helper \Bootstrap::getInstance ()->getAppInitParams ();
27
+
28
+ $ params ['MAGE_DIRS ' ]['base ' ]['path ' ] = BP ;
29
+ $ params = 'INTEGRATION_TEST_PARAMS=" ' . urldecode (http_build_query ($ params )) . '" ' ;
30
+ $ integrationTestCommand = $ params . ' ' . $ command ;
31
+ $ output = parent ::execute ($ integrationTestCommand , $ arguments );
32
+ return $ output ;
33
+ }
34
+ }
Original file line number Diff line number Diff line change 23
23
*
24
24
* {@inheritdoc}
25
25
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
26
-
26
+ * @magentoDbIsolation enabled
27
+ * @magentoAppIsolation enabled
27
28
*/
28
29
class SetModeCommandTest extends \PHPUnit \Framework \TestCase
29
30
{
@@ -147,10 +148,6 @@ private function enableAndAssertProductionMode()
147
148
148
149
$ this ->assertEquals (Cli::RETURN_SUCCESS , $ this ->commandTester ->getStatusCode ());
149
150
150
- $ this ->assertContains ('Deploy using quick strategy ' , $ commandOutput );
151
- $ this ->assertContains ('frontend/Magento/blank/en_US ' , $ commandOutput );
152
- $ this ->assertContains ('adminhtml/Magento/backend ' , $ commandOutput );
153
- $ this ->assertContains ('Execution time: ' , $ commandOutput );
154
151
$ this ->assertContains ('Deployment of static content complete ' , $ commandOutput );
155
152
$ this ->assertContains ('Enabled production mode ' , $ commandOutput );
156
153
}
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public function doOperation()
74
74
$ this ->directoryScanner ->scan ($ path , $ this ->data ['filePatterns ' ], $ this ->data ['excludePatterns ' ])
75
75
);
76
76
}
77
- $ entities = $ this ->phpScanner ->collectEntities ($ files ['php ' ]);
77
+ $ entities = isset ( $ files [ ' php ' ]) ? $ this ->phpScanner ->collectEntities ($ files ['php ' ]) : [] ;
78
78
foreach ($ entities as $ entityName ) {
79
79
class_exists ($ entityName );
80
80
}
You can’t perform that action at this time.
0 commit comments