Skip to content

Commit 3e7cd60

Browse files
committed
AC-13306::Adobe Commerce 2.4.8 core code is compatible with PHP 8.4
1 parent e099ce0 commit 3e7cd60

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
*/
2424
class LiveCodeTest extends \PHPUnit\Framework\TestCase
2525
{
26+
/**
27+
* @var \Magento\Framework\Shell
28+
*/
29+
protected $_shell;
30+
31+
/**
32+
* @var string
33+
*/
34+
protected $_command;
35+
2636
/**
2737
* @var string
2838
*/
@@ -33,6 +43,29 @@ class LiveCodeTest extends \PHPUnit\Framework\TestCase
3343
*/
3444
protected static $pathToSource = '';
3545

46+
/**
47+
* @var boolean
48+
*/
49+
protected static $executedCompilation = false;
50+
51+
/**
52+
* Setup compilation
53+
*
54+
* @return void
55+
*/
56+
protected function setUp(): void
57+
{
58+
if(!self::$executedCompilation ){
59+
$this->_shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer());
60+
$basePath = BP;
61+
$basePath = str_replace('\\', '/', $basePath);
62+
63+
$this->_command = 'php ' . $basePath . '/bin/magento setup:di:compile';
64+
$this->_shell->execute($this->_command);
65+
self::$executedCompilation = true;
66+
}
67+
}
68+
3669
/**
3770
* Setup basics for all tests
3871
*

0 commit comments

Comments
 (0)