CRM-15988 - Update generated examples
[civicrm-core.git] / api / v3 / examples / Activity / Create.php
index 8fd89f938c24afa36122bfab87afc6503e4965d2..ecb37836bb18a8ccd9af801e52dfff49dae27931 100644 (file)
@@ -1,13 +1,6 @@
 <?php
 /**
- * @file
- * Test Generated API Example.
- * See bottom of this file for more detail.
- */
-
-/**
- * Test Generated example of using activity create API.
- *
+ * Test Generated example demonstrating the Activity.create API.
  *
  * @return array
  *   API result array
@@ -21,13 +14,13 @@ function activity_create_example() {
     'status_id' => 2,
     'priority_id' => 1,
     'duration' => 120,
-    'location' => 'Pensulvania',
+    'location' => 'Pennsylvania',
     'details' => 'a test activity',
     'custom_1' => 'custom string',
   );
 
   try{
-    $result = civicrm_api3('activity', 'create', $params);
+    $result = civicrm_api3('Activity', 'create', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -65,7 +58,7 @@ function activity_create_expectedresult() {
         'subject' => 'test activity type id',
         'activity_date_time' => '20110602143613',
         'duration' => '120',
-        'location' => 'Pensulvania',
+        'location' => 'Pennsylvania',
         'phone_id' => '',
         'phone_number' => '',
         'details' => 'a test activity',
@@ -90,11 +83,10 @@ function activity_create_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testActivityCreateCustom
-* and can be found in
+* The test that created it is called "testActivityCreateCustom"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
 *
 * You can see the outcome of the API tests at
@@ -104,7 +96,7 @@ function activity_create_expectedresult() {
 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
 *
 * Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
+* http://MYSITE.ORG/path/to/civicrm/api
 *
 * Read more about testing here
 * http://wiki.civicrm.org/confluence/display/CRM/Testing