Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | ||
3 | /* | |
4 | ||
5 | */ | |
6 | function uf_join_get_example(){ | |
ee600d6f | 7 | $params = array( |
6a488035 TO |
8 | 'entity_table' => 'civicrm_contribution_page', |
9 | 'entity_id' => 1, | |
10 | 'version' => 3, | |
11 | 'sequential' => 1, | |
12 | ); | |
13 | ||
14 | $result = civicrm_api( 'uf_join','get',$params ); | |
15 | ||
16 | return $result; | |
17 | } | |
18 | ||
19 | /* | |
20 | * Function returns array of result expected from previous function | |
21 | */ | |
22 | function uf_join_get_expectedresult(){ | |
23 | ||
ee600d6f | 24 | $expectedResult = array( |
6a488035 TO |
25 | 'is_error' => 0, |
26 | 'version' => 3, | |
27 | 'count' => 1, | |
28 | 'id' => 1, | |
ee600d6f | 29 | 'values' => array( |
30 | '0' => array( | |
6a488035 TO |
31 | 'id' => '1', |
32 | 'is_active' => '1', | |
33 | 'module' => 'CiviContribute', | |
34 | 'entity_table' => 'civicrm_contribution_page', | |
35 | 'entity_id' => '1', | |
36 | 'weight' => '1', | |
37 | 'uf_group_id' => '11', | |
38 | ), | |
39 | ), | |
40 | ); | |
41 | ||
42 | return $expectedResult ; | |
43 | } | |
44 | ||
45 | ||
46 | /* | |
47 | * This example has been generated from the API test suite. The test that created it is called | |
48 | * | |
49 | * testGetUFJoinId and can be found in | |
50 | * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/UFJoinTest.php | |
51 | * | |
52 | * You can see the outcome of the API tests at | |
53 | * http://tests.dev.civicrm.org/trunk/results-api_v3 | |
54 | * | |
55 | * To Learn about the API read | |
56 | * http://book.civicrm.org/developer/current/techniques/api/ | |
57 | * | |
58 | * and review the wiki at | |
59 | * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs | |
60 | * | |
61 | * Read more about testing here | |
62 | * http://wiki.civicrm.org/confluence/display/CRM/Testing | |
63 | * | |
64 | * API Standards documentation: | |
65 | * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards | |
66 | */ |