From bc76e5f7c9d29c199c97900850b7ed4260b7dcef Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 15 Feb 2020 06:51:51 +1100 Subject: [PATCH] dev/core#1594 [TEST] Fix running of unit tests within an extension --- Civi/Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Test.php b/Civi/Test.php index b6f907585e..50d6ebf31c 100644 --- a/Civi/Test.php +++ b/Civi/Test.php @@ -163,7 +163,7 @@ class Test { */ public static function codeGen() { if (!isset(self::$singletons['codeGen'])) { - $civiRoot = '.'; + $civiRoot = str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)); $codeGen = new \CRM_Core_CodeGen_Main("$civiRoot/CRM/Core/DAO", "$civiRoot/sql", $civiRoot, "$civiRoot/templates", NULL, "UnitTests", NULL, "$civiRoot/xml/schema/Schema.xml", NULL); $codeGen->init(); self::$singletons['codeGen'] = $codeGen; -- 2.25.1