6 function uf_field_replace_example(){
10 'option.autoweight' => '',
13 'field_name' => 'first_name',
14 'field_type' => 'Contact',
15 'visibility' => 'Public Pages and Listings',
17 'label' => 'Test First Name',
22 'field_name' => 'country',
23 'field_type' => 'Contact',
24 'visibility' => 'Public Pages and Listings',
26 'label' => 'Test Country',
29 'location_type_id' => 1,
32 'field_name' => 'phone',
33 'field_type' => 'Contact',
34 'visibility' => 'Public Pages and Listings',
36 'label' => 'Test Phone',
39 'location_type_id' => 1,
45 $result = civicrm_api( 'uf_field','replace',$params );
51 * Function returns array of result expected from previous function
53 function uf_field_replace_expectedresult(){
55 $expectedResult = array(
62 'uf_group_id' => '11',
63 'field_name' => 'first_name',
70 'visibility' => 'Public Pages and Listings',
72 'is_searchable' => '1',
73 'location_type_id' => 'null',
74 'phone_type_id' => '',
75 'label' => 'Test First Name',
76 'field_type' => 'Contact',
78 'is_multi_summary' => '',
82 'uf_group_id' => '11',
83 'field_name' => 'country',
90 'visibility' => 'Public Pages and Listings',
92 'is_searchable' => '1',
93 'location_type_id' => '1',
94 'phone_type_id' => '',
95 'label' => 'Test Country',
96 'field_type' => 'Contact',
98 'is_multi_summary' => '',
102 'uf_group_id' => '11',
103 'field_name' => 'phone',
110 'visibility' => 'Public Pages and Listings',
112 'is_searchable' => '1',
113 'location_type_id' => '1',
114 'phone_type_id' => '1',
115 'label' => 'Test Phone',
116 'field_type' => 'Contact',
118 'is_multi_summary' => '',
123 return $expectedResult ;
128 * This example has been generated from the API test suite. The test that created it is called
130 * testReplaceUFFields and can be found in
131 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/UFFieldTest.php
133 * You can see the outcome of the API tests at
134 * http://tests.dev.civicrm.org/trunk/results-api_v3
136 * To Learn about the API read
137 * http://book.civicrm.org/developer/current/techniques/api/
139 * and review the wiki at
140 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
142 * Read more about testing here
143 * http://wiki.civicrm.org/confluence/display/CRM/Testing
145 * API Standards documentation:
146 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards