From 229a603f88977235636b16eba2e163a4b1677567 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 27 Aug 2014 20:40:52 -0700 Subject: [PATCH] CRM_Core_BAO_SettingTest - Fix setting leakage which breaks CRM_Core_BAO_SettingTest A previous commit fixed the leak out of CRM_Case_BAO_CaseTest, but there appears to be more. This fix tries to be more aggressive about setting a general baseline. --- tests/phpunit/CRM/Case/BAO/CaseTest.php | 1 - tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Case/BAO/CaseTest.php b/tests/phpunit/CRM/Case/BAO/CaseTest.php index 3a20c38f35..bb7c03d165 100644 --- a/tests/phpunit/CRM/Case/BAO/CaseTest.php +++ b/tests/phpunit/CRM/Case/BAO/CaseTest.php @@ -44,7 +44,6 @@ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase { protected function tearDown() { parent::tearDown(); $this->quickCleanup($this->tablesToTruncate, TRUE); - CRM_Core_BAO_ConfigSetting::disableComponent('CiviCase'); } function testAddCaseToContact() { diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index deb4d67c49..2865cef374 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -304,6 +304,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { // Rebuild triggers civicrm_api('system', 'flush', array('version' => 3, 'triggers' => 1)); + CRM_Core_BAO_ConfigSetting::setEnabledComponents(array( + 'CiviEvent', 'CiviContribute', 'CiviMember', 'CiviMail', 'CiviReport', 'CiviPledge' + )); + return TRUE; } -- 2.25.1