3 * Test Generated example demonstrating the UFGroup.get API.
8 function uf_group_get_example() {
14 $result = civicrm_api3('UFGroup', 'get', $params);
16 catch (CiviCRM_API3_Exception
$e) {
18 $errorMessage = $e->getMessage();
19 $errorCode = $e->getErrorCode();
20 $errorData = $e->getExtraParams();
22 'error' => $errorMessage,
23 'error_code' => $errorCode,
24 'error_data' => $errorData,
32 * Function returns array of result expected from previous function.
37 function uf_group_get_expectedresult() {
39 $expectedResult = array(
48 'group_type' => 'Individual,Contact',
49 'title' => 'Test Group',
50 'help_pre' => 'help pre',
51 'help_post' => 'help post',
52 'limit_listings_group_id' => '1',
53 'post_URL' => 'http://example.org/post',
54 'add_to_group_id' => '1',
57 'is_edit_link' => '1',
59 'is_update_dupe' => '1',
60 'cancel_URL' => 'http://example.org/cancel',
62 'notify' => 'admin@example.org',
64 'name' => 'Test_Group_2',
66 'created_date' => '2013-07-28 08:49:19',
67 'is_proximity_search' => 0,
72 return $expectedResult;
76 * This example has been generated from the API test suite.
77 * The test that created it is called "testUFGroupGet"
78 * and can be found at:
79 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php
81 * You can see the outcome of the API tests at
82 * https://test.civicrm.org/job/CiviCRM-master-git/
84 * To Learn about the API read
85 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
87 * Browse the api on your own site with the api explorer
88 * http://MYSITE.ORG/path/to/civicrm/api
90 * Read more about testing here
91 * http://wiki.civicrm.org/confluence/display/CRM/Testing
93 * API Standards documentation:
94 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards