CRM-12274
[civicrm-core.git] / api / v3 / examples / ParticipantPaymentGet.php
CommitLineData
6a488035
TO
1<?php
2
3/*
4
5 */
6function participant_payment_get_example(){
7$params = array(
8 'participant_id' => 4,
9 'contribution_id' => 1,
10 'version' => 3,
8a6844b3 11 'debug' => 1,
6a488035
TO
12);
13
14 $result = civicrm_api( 'participant_payment','get',$params );
15
16 return $result;
17}
18
19/*
20 * Function returns array of result expected from previous function
21 */
22function participant_payment_get_expectedresult(){
23
24 $expectedResult = array(
25 'is_error' => 0,
8a6844b3
DL
26 'undefined_fields' => array(
27 '0' => 'participant_id',
28 '1' => 'contribution_id',
29 ),
6a488035
TO
30 'version' => 3,
31 'count' => 1,
32 'id' => 1,
33 'values' => array(
34 '1' => array(
35 'id' => '1',
36 'participant_id' => '4',
37 'contribution_id' => '1',
38 ),
39 ),
8a6844b3 40 'xdebug' => array(
0856e0bb
DL
41 'peakMemory' => 34740680,
42 'memory' => 33998960,
43 'timeIndex' => '79.778831005096',
8a6844b3 44 ),
6a488035
TO
45);
46
47 return $expectedResult ;
48}
49
50
51/*
52* This example has been generated from the API test suite. The test that created it is called
53*
54* testGet and can be found in
55* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ParticipantPaymentTest.php
56*
57* You can see the outcome of the API tests at
58* http://tests.dev.civicrm.org/trunk/results-api_v3
59*
60* To Learn about the API read
61* http://book.civicrm.org/developer/current/techniques/api/
62*
63* and review the wiki at
64* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
65*
66* Read more about testing here
67* http://wiki.civicrm.org/confluence/display/CRM/Testing
68*
69* API Standards documentation:
70* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
71*/