8 * Test Generated example demonstrating the StatusPreference.get API.
13 function status_preference_get_example() {
19 $result = civicrm_api3('StatusPreference', 'get', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
28 'error_message' => $errorMessage,
29 'error_code' => $errorCode,
30 'error_data' => $errorData,
38 * Function returns array of result expected from previous function.
43 function status_preference_get_expectedresult() {
54 'name' => 'test_check',
55 'hush_until' => '2015-12-12',
56 'ignore_severity' => '4',
62 return $expectedResult;
66 * This example has been generated from the API test suite.
67 * The test that created it is called "testStatusPreferenceGet"
68 * and can be found at:
69 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php
71 * You can see the outcome of the API tests at
72 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
74 * To Learn about the API read
75 * https://docs.civicrm.org/dev/en/latest/api/
77 * Browse the API on your own site with the API Explorer. It is in the main
78 * CiviCRM menu, under: Support > Development > API Explorer.
80 * Read more about testing here
81 * https://docs.civicrm.org/dev/en/latest/testing/
83 * API Standards documentation:
84 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/