3 * Test Generated example of using batch update API
6 function batch_update_example(){
8 'name' => 'New_Batch_04',
9 'title' => 'New Batch 04',
10 'description' => 'This is description for New Batch 04',
17 $result = civicrm_api3('batch', 'update', $params);
19 catch (CiviCRM_API3_Exception
$e) {
21 $errorMessage = $e->getMessage();
22 $errorCode = $e->getErrorCode();
23 $errorData = $e->getExtraParams();
24 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
31 * Function returns array of result expected from previous function
33 function batch_update_expectedresult(){
35 $expectedResult = array(
43 'name' => 'New_Batch_04',
44 'title' => 'New Batch 04',
45 'description' => 'This is description for New Batch 04',
49 'modified_date' => '',
50 'saved_search_id' => '',
56 'payment_instrument_id' => '',
57 'exported_date' => '',
63 return $expectedResult;
68 * This example has been generated from the API test suite. The test that created it is called
70 * testUpdate and can be found in
71 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php
73 * You can see the outcome of the API tests at
74 * https://test.civicrm.org/job/CiviCRM-master-git/
76 * To Learn about the API read
77 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
79 * Browse the api on your own site with the api explorer
80 * http://MYSITE.ORG/path/to/civicrm/api/explorer
82 * Read more about testing here
83 * http://wiki.civicrm.org/confluence/display/CRM/Testing
85 * API Standards documentation:
86 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards