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
/
Activity
/
Create.php
diff --git
a/api/v3/examples/Activity/Create.php
b/api/v3/examples/Activity/Create.php
index 8659e8e06aa0fdec8c60843bdca2e6c39fb89d8a..6615362918b295414621933769e8d94e5811f78c 100644
(file)
--- a/
api/v3/examples/Activity/Create.php
+++ b/
api/v3/examples/Activity/Create.php
@@
-1,7
+1,6
@@
<?php
/**
<?php
/**
- * Test Generated example of using activity create API.
- *
+ * Test Generated example demonstrating the Activity.create API.
*
* @return array
* API result array
*
* @return array
* API result array
@@
-21,7
+20,7
@@
function activity_create_example() {
);
try{
);
try{
- $result = civicrm_api3('
a
ctivity', 'create', $params);
+ $result = civicrm_api3('
A
ctivity', 'create', $params);
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
@@
-29,7
+28,8
@@
function activity_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,
);
@@
-77,6
+77,7
@@
function activity_create_expectedresult() {
'campaign_id' => '',
'engagement_level' => '',
'weight' => '',
'campaign_id' => '',
'engagement_level' => '',
'weight' => '',
+ 'is_star' => '',
),
),
);
),
),
);
@@
-84,11
+85,10
@@
function activity_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
-* testActivityCreateCustom
-* and can be found in
+* The test that created it is called "testActivityCreateCustom"
+* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
*
* You can see the outcome of the API tests at
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
*
* You can see the outcome of the API tests at