projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update test examples.
[civicrm-core.git]
/
api
/
v3
/
examples
/
MessageTemplate
/
Create.php
diff --git
a/api/v3/examples/MessageTemplate/Create.php
b/api/v3/examples/MessageTemplate/Create.php
index 14109867ea0b48a9f7f8778ded6cdde77090083f..094118233901e9664e5cc2f2249446a30327f012 100644
(file)
--- a/
api/v3/examples/MessageTemplate/Create.php
+++ b/
api/v3/examples/MessageTemplate/Create.php
@@
-1,7
+1,6
@@
<?php
/**
<?php
/**
- * Test Generated example of using message_template create API.
- *
+ * Test Generated example demonstrating the MessageTemplate.create API.
*
* @return array
* API result array
*
* @return array
* API result array
@@
-18,7
+17,7
@@
function message_template_create_example() {
);
try{
);
try{
- $result = civicrm_api3('
message_t
emplate', 'create', $params);
+ $result = civicrm_api3('
MessageT
emplate', 'create', $params);
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
@@
-26,7
+25,8
@@
function message_template_create_example() {
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
return array(
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
return array(
- 'error' => $errorMessage,
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
);
'error_code' => $errorCode,
'error_data' => $errorData,
);
@@
-47,10
+47,10
@@
function message_template_create_expectedresult() {
'is_error' => 0,
'version' => 3,
'count' => 1,
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 6
5
,
+ 'id' => 6
7
,
'values' => array(
'values' => array(
- '6
5
' => array(
- 'id' => '6
5
',
+ '6
7
' => array(
+ 'id' => '6
7
',
'msg_title' => 'msg_title_165',
'msg_subject' => 'msg_subject_165',
'msg_text' => 'msg_text_165',
'msg_title' => 'msg_title_165',
'msg_subject' => 'msg_subject_165',
'msg_text' => 'msg_text_165',
@@
-68,11
+68,10
@@
function message_template_create_expectedresult() {
return $expectedResult;
}
return $expectedResult;
}
-/*
*
+/*
* This example has been generated from the API test suite.
* This example has been generated from the API test suite.
-* The test that created it is called
-* testCreate
-* and can be found in
+* The test that created it is called "testCreate"
+* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
*
* You can see the outcome of the API tests at
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
*
* You can see the outcome of the API tests at