civicrm/civicrm-core — pull request #293 by pratik-joshi (2013-04-01 13:06:18+00:00)
Title: minor bug found during execution of WebTest_Contact_AddTest::testHouseho...

The following error is thrown while executing mentioned test case :

WebTest_Contact_AddTest::testHouseholdAdd
Civicrm api error.
Failed asserting that false is true.

/home/tests/devel-suite/tests/phpunit/CiviTest/CiviSeleniumTestCase.php:189
/home/tests/devel-suite/tests/phpunit/CiviTest/CiviSeleniumTestCase.php:236
/home/tests/devel-suite/tests/phpunit/WebTest/Contact/AddTest.php:264
/home/tests/devel-suite/tools/scripts/phpunit:75

The api error is thrown because : 'DB Fatal error 'group_id' field not found error' is thrown while executing civicrm_api3_group_get api. This happens as the $returnProperties(used in same api) contains 'group_id' as key, which later is used by CRM_Contact_BAO_Group::getGroups which builts a wrong query.

In commit : unset the wrongly built 'group_id' property at position where $returnProperties is initialized with correct 'id' property .