Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | ||
3 | /* | |
4 | ||
5 | */ | |
6 | function activity_type_get_example(){ | |
edb0d67a | 7 | $params = array( |
6a488035 TO |
8 | 'version' => 3, |
9 | ); | |
10 | ||
11 | $result = civicrm_api( 'activity_type','get',$params ); | |
12 | ||
13 | return $result; | |
14 | } | |
15 | ||
16 | /* | |
17 | * Function returns array of result expected from previous function | |
18 | */ | |
19 | function activity_type_get_expectedresult(){ | |
20 | ||
edb0d67a | 21 | $expectedResult = array( |
6a488035 TO |
22 | 'is_error' => 0, |
23 | 'version' => 3, | |
edb0d67a | 24 | 'count' => 45, |
25 | 'values' => array( | |
6a488035 TO |
26 | '1' => 'Meeting', |
27 | '2' => 'Phone Call', | |
28 | '3' => 'Email', | |
edb0d67a | 29 | '4' => 'Outbound SMS', |
6a488035 TO |
30 | '5' => 'Event Registration', |
31 | '6' => 'Contribution', | |
32 | '7' => 'Membership Signup', | |
33 | '8' => 'Membership Renewal', | |
34 | '9' => 'Tell a Friend', | |
35 | '10' => 'Pledge Acknowledgment', | |
36 | '11' => 'Pledge Reminder', | |
37 | '12' => 'Inbound Email', | |
38 | '13' => 'Open Case', | |
39 | '14' => 'Follow up', | |
40 | '15' => 'Change Case Type', | |
41 | '16' => 'Change Case Status', | |
42 | '17' => 'Membership Renewal Reminder', | |
43 | '18' => 'Change Case Start Date', | |
44 | '19' => 'Bulk Email', | |
45 | '20' => 'Assign Case Role', | |
46 | '21' => 'Remove Case Role', | |
47 | '22' => 'Print PDF Letter', | |
48 | '23' => 'Merge Case', | |
49 | '24' => 'Reassigned Case', | |
50 | '25' => 'Link Cases', | |
51 | '26' => 'Change Case Tags', | |
52 | '27' => 'Add Client To Case', | |
53 | '28' => 'Survey', | |
54 | '29' => 'Canvass', | |
55 | '30' => 'PhoneBank', | |
56 | '31' => 'WalkList', | |
57 | '32' => 'Petition Signature', | |
58 | '33' => 'Change Custom Data', | |
59 | '34' => 'Mass SMS', | |
60 | '35' => 'Change Membership Status', | |
61 | '36' => 'Change Membership Type', | |
62 | '37' => 'Cancel Recurring Contribution', | |
63 | '38' => 'Update Recurring Contribution Billing Details', | |
64 | '39' => 'Update Recurring Contribution', | |
65 | '40' => 'Reminder Sent', | |
66 | '41' => 'Export Accounting Batch', | |
67 | '42' => 'Create Batch', | |
68 | '43' => 'Edit Batch', | |
edb0d67a | 69 | '44' => 'SMS delivery', |
70 | '45' => 'Inbound SMS', | |
6a488035 TO |
71 | ), |
72 | ); | |
73 | ||
74 | return $expectedResult ; | |
75 | } | |
76 | ||
77 | ||
78 | /* | |
79 | * This example has been generated from the API test suite. The test that created it is called | |
80 | * | |
81 | * testActivityTypeGet and can be found in | |
82 | * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ActivityTypeTest.php | |
83 | * | |
84 | * You can see the outcome of the API tests at | |
85 | * http://tests.dev.civicrm.org/trunk/results-api_v3 | |
86 | * | |
87 | * To Learn about the API read | |
88 | * http://book.civicrm.org/developer/current/techniques/api/ | |
89 | * | |
90 | * and review the wiki at | |
91 | * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs | |
92 | * | |
93 | * Read more about testing here | |
94 | * http://wiki.civicrm.org/confluence/display/CRM/Testing | |
95 | * | |
96 | * API Standards documentation: | |
97 | * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards | |
98 | */ |