From 08a2ea5e0f81fde724ce51c6cd44ab4285068791 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 15 Jul 2015 18:44:24 +0530 Subject: [PATCH] CRM test fix CRM_Group_Page_AjaxTest.testTraditionalACL --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index a7a361e338..bb9fe05020 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -3079,10 +3079,6 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) 'view picked', 'civicrm_group', $this->_permissionedGroup, 'Edit', 'civicrm_saved_search', {$this->_permissionedDisabledGroup}, 1 ); "); - //flush cache - CRM_ACL_BAO_Cache::resetCache(); - CRM_Contact_BAO_Group::getPermissionClause(TRUE); - CRM_ACL_API::groupPermission('whatever', 9999, NULL, 'civicrm_saved_search', NULL, NULL, TRUE); } $this->_loggedInUser = CRM_Core_Session::singleton()->get('userID'); @@ -3090,6 +3086,13 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) 'group_id' => $this->_permissionedGroup, 'contact_id' => $this->_loggedInUser, )); + + if (!$isProfile) { + //flush cache + CRM_ACL_BAO_Cache::resetCache(); + CRM_Contact_BAO_Group::getPermissionClause(TRUE); + CRM_ACL_API::groupPermission('whatever', 9999, NULL, 'civicrm_saved_search', NULL, NULL, TRUE); + } } /** -- 2.25.1