Skip to content

Commit

Permalink
Make compatible with PHPUnit 9.5
Browse files Browse the repository at this point in the history
Magento 2.4.4 uses PHPUnit 9.5.x
Earlier versions of PHPUnit can not be used because of the dependency on
PHP 8.1.

This change is backward compatible (checked until PHPUnit 7.0)
  • Loading branch information
Vinai committed Apr 14, 2022
1 parent bbe4399 commit 1f48036
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace ReachDigital\TestFramework\Annotation;

use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Test as TestUtil;

/**
* Rewrite of \Magento\TestFramework\Annotation\AppIsolation because that class will always reinitialize on each test
Expand Down Expand Up @@ -74,7 +75,7 @@ public function startTest(TestCase $testCase)
private function isTestMagentoAppIsolationEnabled(TestCase $testCase)
{
/* Determine an isolation from doc comment */
$annotations = $testCase->getAnnotations();
$annotations = TestUtil::parseTestMethodAnnotations(get_class($testCase), $testCase->getName(false));
$annotations = array_replace((array) $annotations['class'], (array) $annotations['method']);

if (isset($annotations['magentoAppIsolation'])) {
Expand Down

0 comments on commit 1f48036

Please sign in to comment.