From 33fefd54607b755ff3f341131b573121e3a81547 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 6 Feb 2017 12:51:09 +1300 Subject: [PATCH] CRM-19973 Set settings defaults during reset function. I used buildkit to generate & run the extension test. The issue was that the settings were being loaded but later the \Civi::reset(); function was being called - From the testListener I think and it was flushing the settings bag so it no longer held default variables I did look at putting this in the boot function instead and only rejected that for fear of unintended consequences. --- Civi/Test/CiviTestListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Test/CiviTestListener.php b/Civi/Test/CiviTestListener.php index 3bd6f0dbc5..d923fad9c9 100644 --- a/Civi/Test/CiviTestListener.php +++ b/Civi/Test/CiviTestListener.php @@ -95,10 +95,10 @@ class CiviTestListener extends \PHPUnit_Framework_BaseTestListener { $test->setUpHeadless(); - $config = \CRM_Core_Config::singleton(TRUE, TRUE); // ugh, performance \CRM_Utils_System::flushCache(); \Civi::reset(); \CRM_Core_Session::singleton()->set('userID', NULL); + $config = \CRM_Core_Config::singleton(TRUE, TRUE); // ugh, performance if (property_exists($config->userPermissionClass, 'permissions')) { $config->userPermissionClass->permissions = NULL; -- 2.25.1