Merge pull request #17664 from jitendrapurohit/core-1829
[civicrm-core.git] / Civi / Test / CiviTestListener.php
index e32d9b45d28888a925824bb608a5de85bd944799..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 {
 
   /**