3 * Test Generated example of using message_template get API
6 function message_template_get_example(){
8 'msg_title' => 'msg_title_56',
9 'msg_subject' => 'msg_subject_56',
10 'msg_text' => 'msg_text_56',
11 'msg_html' => 'msg_html_56',
15 'pdf_format_id' => '1',
19 $result = civicrm_api3('message_template', 'get', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
26 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
33 * Function returns array of result expected from previous function
35 function message_template_get_expectedresult(){
37 $expectedResult = array(
45 'msg_title' => 'msg_title_56',
46 'msg_subject' => 'msg_subject_56',
47 'msg_text' => 'msg_text_56',
48 'msg_html' => 'msg_html_56',
50 'workflow_id' => '56',
53 'pdf_format_id' => '1',
58 return $expectedResult;
63 * This example has been generated from the API test suite. The test that created it is called
65 * testGet and can be found in
66 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
68 * You can see the outcome of the API tests at
69 * https://test.civicrm.org/job/CiviCRM-master-git/
71 * To Learn about the API read
72 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
74 * Browse the api on your own site with the api explorer
75 * http://MYSITE.ORG/path/to/civicrm/api/explorer
77 * Read more about testing here
78 * http://wiki.civicrm.org/confluence/display/CRM/Testing
80 * API Standards documentation:
81 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards