X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FTest%2FCiviTestListener.php;h=2851bda3d89c9d283186e3dd54beeee9f104b327;hb=833e5520c0d4ada3bfa0d450a184bf78134b0a21;hp=35a8a0c7281c6daec9f3313c0caa6df0d55d0c7d;hpb=d7da8786d2929837ce85f3ef945fcb86518d53f5;p=civicrm-core.git diff --git a/Civi/Test/CiviTestListener.php b/Civi/Test/CiviTestListener.php index 35a8a0c728..2851bda3d8 100644 --- a/Civi/Test/CiviTestListener.php +++ b/Civi/Test/CiviTestListener.php @@ -7,6 +7,9 @@ if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Ve // Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior (the class // gets defined without executing the code before it and so the definition is not properly conditional) } +elseif (version_compare(\PHPUnit\Runner\Version::id(), '7.0.0', '>=')) { + class_alias('Civi\Test\CiviTestListenerPHPUnit7', 'Civi\Test\CiviTestListener'); +} else { /** @@ -35,7 +38,7 @@ else { private $cache = []; /** - * @var \CRM_Core_Transaction|NULL + * @var \CRM_Core_Transaction|null */ private $tx;