6 function group_get_example(){
9 'name' => 'Test Group 1_6',
12 $result = civicrm_api( 'group','get',$params );
18 * Function returns array of result expected from previous function
20 function group_get_expectedresult(){
22 $expectedResult = array(
30 'name' => 'Test Group 1_6',
31 'title' => 'New Test Group Created',
32 'description' => 'New Test Group Created',
34 'saved_search_id' => '',
36 'visibility' => 'Public Pages',
37 'where_clause' => ' ( `civicrm_group_contact-6`.group_id IN ( 6 ) AND `civicrm_group_contact-6`.status IN ("Added") ) ',
38 'select_tables' => 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-6`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-6` ON contact_a.id = `civicrm_group_contact-6`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}',
39 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-6`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-6` ON contact_a.id = `civicrm_group_contact-6`.contact_id ";}',
40 'group_type' => array(
55 return $expectedResult ;
60 * This example has been generated from the API test suite. The test that created it is called
62 * testGetGroupParamsWithGroupName and can be found in
63 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/GroupTest.php
65 * You can see the outcome of the API tests at
66 * http://tests.dev.civicrm.org/trunk/results-api_v3
68 * To Learn about the API read
69 * http://book.civicrm.org/developer/current/techniques/api/
71 * and review the wiki at
72 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
74 * Read more about testing here
75 * http://wiki.civicrm.org/confluence/display/CRM/Testing
77 * API Standards documentation:
78 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards