From c7ef9868ee8557905856937fe3fb2fc08ce35d8d Mon Sep 17 00:00:00 2001 From: monishdeb Date: Mon, 14 Sep 2015 17:21:39 +0530 Subject: [PATCH] CRM-16941 test failure fix ---------------------------------------- * CRM-16941: Search Form and api.Get fixes for Contact https://issues.civicrm.org/jira/browse/CRM-16941 --- CRM/Contact/BAO/Group.php | 2 +- tests/phpunit/CRM/Contact/BAO/GroupContactTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 6d146c8b89..ec1466cd4c 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -201,7 +201,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { * this array contains the list of members for this group id */ public static function &getMember($groupID, $useCache = TRUE) { - $params = array(array('group', 'IN', array($groupID => 1), 0, 0)); + $params = array(array('group', '=', $groupID, 0, 0)); $returnProperties = array('contact_id'); list($contacts, $_) = CRM_Contact_BAO_Query::apiQuery($params, $returnProperties, NULL, NULL, 0, 0, $useCache); diff --git a/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php b/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php index bbf4a136ef..42a8364356 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php @@ -134,7 +134,7 @@ class CRM_Contact_BAO_GroupContactTest extends CiviUnitTestCase { // Check if searching by parent group returns both parent and child group contacts $searchParams = array( - 'group' => array($parentGroup->id => 1), + 'group' => $parentGroup->id, 'version' => 3, ); $result = civicrm_api('contact', 'get', $searchParams); @@ -148,7 +148,7 @@ class CRM_Contact_BAO_GroupContactTest extends CiviUnitTestCase { // Check if searching by child group returns just child group contacts $searchParams = array( - 'group' => array($childGroup->id => 1), + 'group' => $childGroup->id, 'version' => 3, ); $result = civicrm_api('contact', 'get', $searchParams); -- 2.25.1