3 * Test Generated example of using custom_group get API
6 function custom_group_get_example(){
10 $result = civicrm_api3('custom_group', 'get', $params);
12 catch (CiviCRM_API3_Exception
$e) {
14 $errorMessage = $e->getMessage();
15 $errorCode = $e->getErrorCode();
16 $errorData = $e->getExtraParams();
17 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
24 * Function returns array of result expected from previous function
26 function custom_group_get_expectedresult(){
28 $expectedResult = array(
36 'name' => 'test_group_1',
37 'title' => 'Test_Group_1',
38 'extends' => 'Individual',
40 'collapse_display' => '1',
41 'help_pre' => 'This is Pre Help For Test Group 1',
42 'help_post' => 'This is Post Help For Test Group 1',
45 'table_name' => 'civicrm_value_test_group_1_1',
47 'collapse_adv_display' => 0,
53 return $expectedResult;
58 * This example has been generated from the API test suite. The test that created it is called
60 * testGetCustomGroupSuccess and can be found in
61 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
63 * You can see the outcome of the API tests at
64 * https://test.civicrm.org/job/CiviCRM-master-git/
66 * To Learn about the API read
67 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
69 * Browse the api on your own site with the api explorer
70 * http://MYSITE.ORG/path/to/civicrm/api/explorer
72 * Read more about testing here
73 * http://wiki.civicrm.org/confluence/display/CRM/Testing
75 * API Standards documentation:
76 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards