3 * Test Generated example demonstrating the CustomGroup.get API.
8 function custom_group_get_example() {
12 $result = civicrm_api3('CustomGroup', 'get', $params);
14 catch (CiviCRM_API3_Exception
$e) {
16 $errorMessage = $e->getMessage();
17 $errorCode = $e->getErrorCode();
18 $errorData = $e->getExtraParams();
21 'error_message' => $errorMessage,
22 'error_code' => $errorCode,
23 'error_data' => $errorData,
31 * Function returns array of result expected from previous function.
36 function custom_group_get_expectedresult() {
46 'name' => 'test_group_1',
47 'title' => 'Test_Group_1',
48 'extends' => 'Individual',
50 'collapse_display' => '1',
51 'help_pre' => 'This is Pre Help For Test Group 1',
52 'help_post' => 'This is Post Help For Test Group 1',
55 'table_name' => 'civicrm_value_test_group_1_1',
57 'collapse_adv_display' => 0,
63 return $expectedResult;
67 * This example has been generated from the API test suite.
68 * The test that created it is called "testGetCustomGroupSuccess"
69 * and can be found at:
70 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
72 * You can see the outcome of the API tests at
73 * https://test.civicrm.org/job/CiviCRM-master-git/
75 * To Learn about the API read
76 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
78 * Browse the api on your own site with the api explorer
79 * http://MYSITE.ORG/path/to/civicrm/api
81 * Read more about testing here
82 * http://wiki.civicrm.org/confluence/display/CRM/Testing
84 * API Standards documentation:
85 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards