Skip to content

Commit ffd75cd

Browse files
Dnyaneshwar S JambhulkarDnyaneshwar S Jambhulkar
authored andcommitted
AC-15068::Laminas MVC Retiring
1 parent ff6fc25 commit ffd75cd

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

dev/tests/setup-integration/testsuite/Magento/Setup/SetupInstallMvcTest.php

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
use Magento\Framework\App\ResourceConnection;
1111
use Magento\Framework\Setup\Mvc\MvcApplication;
1212
use Magento\Framework\Setup\Mvc\ServiceManagerFactory;
13-
use Magento\Framework\Shell;
14-
use Magento\Framework\Shell\CommandRenderer;
13+
1514
use Magento\TestFramework\Deploy\CliCommand;
1615
use Magento\TestFramework\Deploy\TestModuleManager;
1716
use Magento\TestFramework\Helper\Bootstrap;
@@ -37,18 +36,15 @@ class SetupInstallMvcTest extends SetupTestCase
3736
*/
3837
private $resourceConnection;
3938

40-
/**
41-
* @var Shell
42-
*/
43-
private $shell;
39+
4440

4541
protected function setUp(): void
4642
{
4743
$objectManager = Bootstrap::getObjectManager();
4844
$this->moduleManager = $objectManager->get(TestModuleManager::class);
4945
$this->cliCommand = $objectManager->get(CliCommand::class);
5046
$this->resourceConnection = $objectManager->get(ResourceConnection::class);
51-
$this->shell = new Shell(new CommandRenderer());
47+
5248
}
5349

5450
/**
@@ -283,12 +279,6 @@ public function testSetupInstallWithDataPatchesAndCustomMvc()
283279
'patch_list table should exist after installation with data patches'
284280
);
285281

286-
// Check for patch records (may or may not exist depending on module)
287-
$select = $connection->select()
288-
->from($patchListTable)
289-
->where('patch_name LIKE ?', '%TestSetupDeclarationModule1%');
290-
$patchRecords = $connection->fetchAll($select);
291-
292282
// Data patches are optional, so we just verify the table exists
293283
$this->assertTrue(
294284
$connection->isTableExists($patchListTable),
@@ -1032,7 +1022,15 @@ private function executeDiCompileCommand($params = [])
10321022
}
10331023

10341024
try {
1035-
return $this->shell->execute($diCompileCommand);
1025+
$output = [];
1026+
$returnCode = 0;
1027+
exec($diCompileCommand . ' 2>&1', $output, $returnCode);
1028+
1029+
if ($returnCode !== 0) {
1030+
throw new \Exception(implode("\n", $output));
1031+
}
1032+
1033+
return implode("\n", $output);
10361034
} catch (\Exception $e) {
10371035
// Check if this is the "modules are not enabled" error
10381036
$errorMessage = $e->getMessage();

0 commit comments

Comments
 (0)