4 * Test Generated API Example.
5 * See bottom of this file for more detail.
9 * Test Generated example of using custom_group get API.
15 function custom_group_get_example() {
19 $result = civicrm_api3('custom_group', 'get', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
27 'error' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function custom_group_get_expectedresult() {
44 $expectedResult = array(
52 'name' => 'test_group_1',
53 'title' => 'Test_Group_1',
54 'extends' => 'Individual',
56 'collapse_display' => '1',
57 'help_pre' => 'This is Pre Help For Test Group 1',
58 'help_post' => 'This is Post Help For Test Group 1',
61 'table_name' => 'civicrm_value_test_group_1_1',
63 'collapse_adv_display' => 0,
69 return $expectedResult;
73 * This example has been generated from the API test suite.
74 * The test that created it is called
75 * testGetCustomGroupSuccess
77 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
79 * You can see the outcome of the API tests at
80 * https://test.civicrm.org/job/CiviCRM-master-git/
82 * To Learn about the API read
83 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
85 * Browse the api on your own site with the api explorer
86 * http://MYSITE.ORG/path/to/civicrm/api/explorer
88 * Read more about testing here
89 * http://wiki.civicrm.org/confluence/display/CRM/Testing
91 * API Standards documentation:
92 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards