3 * Test Generated example of using message_template get API.
9 function message_template_get_example() {
11 'msg_title' => 'msg_title_166',
12 'msg_subject' => 'msg_subject_166',
13 'msg_text' => 'msg_text_166',
14 'msg_html' => 'msg_html_166',
21 $result = civicrm_api3('message_template', 'get', $params);
23 catch (CiviCRM_API3_Exception
$e) {
25 $errorMessage = $e->getMessage();
26 $errorCode = $e->getErrorCode();
27 $errorData = $e->getExtraParams();
29 'error' => $errorMessage,
30 'error_code' => $errorCode,
31 'error_data' => $errorData,
39 * Function returns array of result expected from previous function.
44 function message_template_get_expectedresult() {
46 $expectedResult = array(
54 'msg_title' => 'msg_title_166',
55 'msg_subject' => 'msg_subject_166',
56 'msg_text' => 'msg_text_166',
57 'msg_html' => 'msg_html_166',
59 'workflow_id' => '166',
63 'pdf_format_id' => '166',
68 return $expectedResult;
72 * This example has been generated from the API test suite.
73 * The test that created it is called
76 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
78 * You can see the outcome of the API tests at
79 * https://test.civicrm.org/job/CiviCRM-master-git/
81 * To Learn about the API read
82 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
84 * Browse the api on your own site with the api explorer
85 * http://MYSITE.ORG/path/to/civicrm/api
87 * Read more about testing here
88 * http://wiki.civicrm.org/confluence/display/CRM/Testing
90 * API Standards documentation:
91 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards