CRM-15988 - Update generated examples
[civicrm-core.git] / api / v3 / examples / Contribution / ContributionCreateWithNote.php
index d68597b41585120f3a606a697328b647263b5a04..4a19762036ba1bc554ec2c46587aa2fe201b9b6c 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 /**
- * Test Generated example of using contribution create API.
+ * Test Generated example demonstrating the Contribution.create API.
  *
- * Demonstrates creating contribution with Note Entity
+ * Demonstrates creating contribution with Note Entity.
  *
  * @return array
  *   API result array
  */
 function contribution_create_example() {
   $params = array(
-    'contact_id' => 18,
+    'contact_id' => 17,
     'receive_date' => '2012-01-01',
     'total_amount' => '100',
     'financial_type_id' => 1,
@@ -25,7 +25,7 @@ function contribution_create_example() {
   );
 
   try{
-    $result = civicrm_api3('contribution', 'create', $params);
+    $result = civicrm_api3('Contribution', 'create', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -58,7 +58,7 @@ function contribution_create_expectedresult() {
     'values' => array(
       '1' => array(
         'id' => '1',
-        'contact_id' => '18',
+        'contact_id' => '17',
         'financial_type_id' => '1',
         'contribution_page_id' => '',
         'payment_instrument_id' => '1',
@@ -93,11 +93,10 @@ function contribution_create_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testCreateContributionWithNote
-* and can be found in
+* The test that created it is called "testCreateContributionWithNote"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
 *
 * You can see the outcome of the API tests at