Ian province abbreviation patch - issue 724
[civicrm-core.git] / api / v3 / examples / UFField / Replace.php
index 141fdcf3e0ff2b2ca69bd17477b0cca63caf4d09..f94ad49347d9066536b138bbdc647b4c7b5ac5b6 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
- * Test Generated example of using uf_field replace API.
- *
+ * Test Generated example demonstrating the UFField.replace API.
  *
  * @return array
  *   API result array
@@ -42,10 +41,11 @@ function uf_field_replace_example() {
         'phone_type_id' => 1,
       ),
     ),
+    'check_permissions' => TRUE,
   );
 
   try{
-    $result = civicrm_api3('uf_field', 'replace', $params);
+    $result = civicrm_api3('UFField', 'replace', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -144,11 +144,10 @@ function uf_field_replace_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testReplaceUFFields
-* and can be found in
+* The test that created it is called "testReplaceUFFields"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
 *
 * You can see the outcome of the API tests at