3 * Test Generated example demonstrating the GroupContact.get API.
8 function group_contact_get_example() {
14 $result = civicrm_api3('GroupContact', 'get', $params);
16 catch (CiviCRM_API3_Exception
$e) {
18 $errorMessage = $e->getMessage();
19 $errorCode = $e->getErrorCode();
20 $errorData = $e->getExtraParams();
23 'error_message' => $errorMessage,
24 'error_code' => $errorCode,
25 'error_data' => $errorData,
33 * Function returns array of result expected from previous function.
38 function group_contact_get_expectedresult() {
49 'title' => 'New Test Group Created',
50 'visibility' => 'Public Pages',
52 'in_date' => '2013-07-28 08:50:19',
58 return $expectedResult;
62 * This example has been generated from the API test suite.
63 * The test that created it is called "testGet"
64 * and can be found at:
65 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
67 * You can see the outcome of the API tests at
68 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
70 * To Learn about the API read
71 * https://docs.civicrm.org/dev/en/latest/api/
73 * Browse the API on your own site with the API Explorer. It is in the main
74 * CiviCRM menu, under: Support > Development > API Explorer.
76 * Read more about testing here
77 * https://docs.civicrm.org/dev/en/latest/testing/
79 * API Standards documentation:
80 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/