6 function group_get_example(){
9 'name' => 'Test Group 1_5',
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_5',
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-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ',
38 'select_tables' => 'a:9:{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-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}',
39 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.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