classload extension test folders
authordemeritcowboy <demeritcowboy@hotmail.com>
Sat, 17 Sep 2022 14:43:15 +0000 (10:43 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Sun, 18 Sep 2022 13:57:54 +0000 (09:57 -0400)
CRM/Extension/ClassLoader.php

index bdd9ce6c68e6e9445a5e8cfc875f432ebae9ec12..9ca81638bff8dd7567cb4213da68e7be7913c77b 100644 (file)
@@ -164,6 +164,11 @@ class CRM_Extension_ClassLoader {
 
           case 'psr4':
             $loader->addPsr4($mapping['prefix'], $path . '/' . $mapping['path']);
+            if (defined('CIVICRM_TEST')) {
+              if (is_dir($path . '/tests/phpunit/' . $mapping['path'])) {
+                $loader->addPsr4($mapping['prefix'], $path . '/tests/phpunit/' . $mapping['path']);
+              }
+            }
             break;
         }
       }