From 662492b761cbae07bdbb6a6c4329e50636f93683 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 14 Jul 2023 10:07:54 +1200 Subject: [PATCH] Move turning logging off to the tearDown --- tests/phpunit/api/v3/ReportTemplateTest.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/phpunit/api/v3/ReportTemplateTest.php b/tests/phpunit/api/v3/ReportTemplateTest.php index 8c16bc1bbe..3fa3647d82 100644 --- a/tests/phpunit/api/v3/ReportTemplateTest.php +++ b/tests/phpunit/api/v3/ReportTemplateTest.php @@ -38,6 +38,7 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { * Our group reports use an alter so transaction cleanup won't work. */ public function tearDown(): void { + Civi::settings()->set('logging', 0); $this->quickCleanUpFinancialEntities(); $this->quickCleanup(['civicrm_group', 'civicrm_saved_search', 'civicrm_group_contact', 'civicrm_group_contact_cache', 'civicrm_group'], TRUE); (new CRM_Logging_Schema())->dropAllLogTables(); @@ -266,9 +267,6 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { $this->callAPISuccess('report_template', 'getrows', [ 'report_id' => $reportID, ]); - if (strpos($reportID, 'logging') === 0) { - Civi::settings()->set('logging', 0); - } } /** @@ -287,7 +285,6 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { $this->callAPISuccess('report_template', 'getrows', [ 'report_id' => 'logging/contact/summary', ]); - Civi::settings()->set('logging', 0); } /** @@ -319,9 +316,6 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { $this->callAPISuccess('report_template', 'getrows', [ 'report_id' => $reportID, ]); - if (strpos($reportID, 'logging') === 0) { - Civi::settings()->set('logging', 0); - } } /** @@ -349,9 +343,6 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { $this->callAPIAndDocument('report_template', 'getstatistics', [ 'report_id' => $reportID, ], __FUNCTION__, __FILE__, $description, 'Getstatistics'); - if (strpos($reportID, 'logging') === 0) { - Civi::settings()->set('logging', 0); - } } /** -- 2.25.1