CRM-16941 test failure fix
authormonishdeb <monish.deb@webaccessglobal.com>
Mon, 14 Sep 2015 11:51:39 +0000 (17:21 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 14 Sep 2015 12:04:42 +0000 (17:34 +0530)
----------------------------------------
* CRM-16941: Search Form and api.Get fixes for Contact
  https://issues.civicrm.org/jira/browse/CRM-16941

CRM/Contact/BAO/Group.php
tests/phpunit/CRM/Contact/BAO/GroupContactTest.php

index 6d146c8b891ff56b85a95037130422cc7b353457..ec1466cd4c590ff19399f27e64c17b35f0f64680 100644 (file)
@@ -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);
 
index bbf4a136ef813f66fc2e74d7a83ef39753bb1dd2..42a83643562ce60f2248068da2bcf9bf18352353 100644 (file)
@@ -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);