Merge pull request #17664 from jitendrapurohit/core-1829
[civicrm-core.git] / Civi / Test / CiviTestListener.php
index 35a8a0c7281c6daec9f3313c0caa6df0d55d0c7d..2851bda3d89c9d283186e3dd54beeee9f104b327 100644 (file)
@@ -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;