3 * Test Generated example of using batch update API.
8 function batch_update_example() {
10 'name' => 'New_Batch_04',
11 'title' => 'New Batch 04',
12 'description' => 'This is description for New Batch 04',
19 $result = civicrm_api3('batch', 'update', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
27 'error' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function batch_update_expectedresult() {
44 $expectedResult = array(
52 'name' => 'New_Batch_04',
53 'title' => 'New Batch 04',
54 'description' => 'This is description for New Batch 04',
58 'modified_date' => '',
59 'saved_search_id' => '',
65 'payment_instrument_id' => '',
66 'exported_date' => '',
72 return $expectedResult;
76 * This example has been generated from the API test suite.
77 * The test that created it is called
80 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php
82 * You can see the outcome of the API tests at
83 * https://test.civicrm.org/job/CiviCRM-master-git/
85 * To Learn about the API read
86 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
88 * Browse the api on your own site with the api explorer
89 * http://MYSITE.ORG/path/to/civicrm/api
91 * Read more about testing here
92 * http://wiki.civicrm.org/confluence/display/CRM/Testing
94 * API Standards documentation:
95 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards