From b4b1907157f57edf0bb2c6b885cd9adfb832bbd0 Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 29 Sep 2017 12:40:49 -0400 Subject: [PATCH] CRM-21229 - avoid invalid fails due to static variable. --- tests/phpunit/CRM/Group/Page/AjaxTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/CRM/Group/Page/AjaxTest.php b/tests/phpunit/CRM/Group/Page/AjaxTest.php index 0ac7fa6985..6f04136df9 100644 --- a/tests/phpunit/CRM/Group/Page/AjaxTest.php +++ b/tests/phpunit/CRM/Group/Page/AjaxTest.php @@ -26,6 +26,10 @@ class CRM_Group_Page_AjaxTest extends CiviUnitTestCase { public function setUp() { parent::setUp(); + // CRM_Contact_BAO_Group::getPermissionClause sets a static variable. + // Ensure it is reset before each run. + $force = TRUE; + CRM_Contact_BAO_Group::getPermissionClause($force); $this->_params = array( 'page' => 1, 'rp' => 50, -- 2.25.1