3 * Test Generated example of using message_template get API
6 function message_template_get_example(){
8 'msg_title' => 'msg_title_2',
9 'msg_subject' => 'msg_subject_2',
10 'msg_text' => 'msg_text_2',
11 'msg_html' => 'msg_html_2',
18 $result = civicrm_api3('message_template', 'get', $params);
20 catch (CiviCRM_API3_Exception
$e) {
22 $errorMessage = $e->getMessage();
23 $errorCode = $e->getErrorCode();
24 $errorData = $e->getExtraParams();
25 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
32 * Function returns array of result expected from previous function
34 function message_template_get_expectedresult(){
36 $expectedResult = array(
44 'msg_title' => 'msg_title_2',
45 'msg_subject' => 'msg_subject_2',
46 'msg_text' => 'msg_text_2',
47 'msg_html' => 'msg_html_2',
52 'pdf_format_id' => '1',
57 return $expectedResult;
62 * This example has been generated from the API test suite. The test that created it is called
64 * testGet and can be found in
65 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
67 * You can see the outcome of the API tests at
68 * https://test.civicrm.org/job/CiviCRM-master-git/
70 * To Learn about the API read
71 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
73 * Browse the api on your own site with the api explorer
74 * http://MYSITE.ORG/path/to/civicrm/api/explorer
76 * Read more about testing here
77 * http://wiki.civicrm.org/confluence/display/CRM/Testing
79 * API Standards documentation:
80 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards