3 * Test Generated example demonstrating the MailSettings.get API.
5 * Demonstrates get + delete in the same call.
10 function mail_settings_get_example() {
12 'title' => 'MailSettings title',
13 'api.MailSettings.delete' => 1,
17 $result = civicrm_api3('MailSettings', 'get', $params);
19 catch (CiviCRM_API3_Exception
$e) {
21 $errorMessage = $e->getMessage();
22 $errorCode = $e->getErrorCode();
23 $errorData = $e->getExtraParams();
26 'error_message' => $errorMessage,
27 'error_code' => $errorCode,
28 'error_data' => $errorData,
36 * Function returns array of result expected from previous function.
41 function mail_settings_get_expectedresult() {
43 $expectedResult = array(
53 'domain' => 'EXAMPLE.ORG',
54 'api.MailSettings.delete' => array(
64 'name' => 'my mail setting',
66 'domain' => 'setting.com',
67 'server' => 'localhost',
71 'api.MailSettings.delete' => array(
81 return $expectedResult;
85 * This example has been generated from the API test suite.
86 * The test that created it is called "testGetMailSettingsChainDelete"
87 * and can be found at:
88 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php
90 * You can see the outcome of the API tests at
91 * https://test.civicrm.org/job/CiviCRM-master-git/
93 * To Learn about the API read
94 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
96 * Browse the api on your own site with the api explorer
97 * http://MYSITE.ORG/path/to/civicrm/api
99 * Read more about testing here
100 * http://wiki.civicrm.org/confluence/display/CRM/Testing
102 * API Standards documentation:
103 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards