17f2e27c273eb420003f010764d82a80374ca2e0
3 * Test Generated example demonstrating the PledgePayment.get API.
8 function pledge_payment_get_example() {
12 $result = civicrm_api3('PledgePayment', 'get', $params);
14 catch (CiviCRM_API3_Exception
$e) {
16 $errorMessage = $e->getMessage();
17 $errorCode = $e->getErrorCode();
18 $errorData = $e->getExtraParams();
20 'error' => $errorMessage,
21 'error_code' => $errorCode,
22 'error_data' => $errorData,
30 * Function returns array of result expected from previous function.
35 function pledge_payment_get_expectedresult() {
37 $expectedResult = array(
45 'scheduled_amount' => '20.00',
47 'scheduled_date' => '20130728085413',
48 'reminder_count' => 0,
54 'scheduled_amount' => '20.00',
56 'scheduled_date' => '20130728085413',
57 'reminder_count' => 0,
63 'scheduled_amount' => '20.00',
65 'scheduled_date' => '20130728085413',
66 'reminder_count' => 0,
72 'scheduled_amount' => '20.00',
74 'scheduled_date' => '20130728085413',
75 'reminder_count' => 0,
81 'scheduled_amount' => '20.00',
83 'scheduled_date' => '20130728085413',
84 'reminder_count' => 0,
90 return $expectedResult;
94 * This example has been generated from the API test suite.
95 * The test that created it is called "testGetPledgePayment"
96 * and can be found at:
97 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php
99 * You can see the outcome of the API tests at
100 * https://test.civicrm.org/job/CiviCRM-master-git/
102 * To Learn about the API read
103 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
105 * Browse the api on your own site with the api explorer
106 * http://MYSITE.ORG/path/to/civicrm/api
108 * Read more about testing here
109 * http://wiki.civicrm.org/confluence/display/CRM/Testing
111 * API Standards documentation:
112 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards