Ian province abbreviation patch - issue 724
[civicrm-core.git] / api / v3 / examples / Contact / GetFieldsOptions.php
index bbca0bac69190b341d9bd43cb468e552986a933e..2b10ae16bfb1621b2864ba0b12d50386a2e56457 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Test Generated example of using contact GetFields API.
+ * Test Generated example demonstrating the Contact.getfields API.
  *
  * Demonstrates retrieving metadata with custom field options.
  *
@@ -16,7 +16,7 @@ function contact_getfields_example() {
   );
 
   try{
-    $result = civicrm_api3('contact', 'GetFields', $params);
+    $result = civicrm_api3('Contact', 'getfields', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -577,7 +577,7 @@ function contact_getfields_expectedresult() {
       'is_deceased' => array(
         'name' => 'is_deceased',
         'type' => 16,
-        'title' => 'Is Deceased',
+        'title' => 'Deceased',
         'import' => TRUE,
         'where' => 'civicrm_contact.is_deceased',
         'headerPattern' => '/i(s\\s)?d(eceased)$/i',
@@ -689,7 +689,7 @@ function contact_getfields_expectedresult() {
       'source' => array(
         'name' => 'source',
         'type' => 2,
-        'title' => 'Source of Contact Data',
+        'title' => 'Contact Source',
         'maxlength' => 255,
         'size' => 30,
         'import' => TRUE,
@@ -770,11 +770,10 @@ function contact_getfields_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testCustomFieldCreateWithOptionValues
-* and can be found in
+* The test that created it is called "testCustomFieldCreateWithOptionValues"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
 *
 * You can see the outcome of the API tests at