Merge branch 4.5 into 4.6
[civicrm-core.git] / api / v3 / examples / ReportTemplate / Getstatistics.php
index 14ac786007d92d93361eb56898d3db2852681ee1..93e6fc6d99b4b5e51dbb8656befc39d366fb8978 100644 (file)
@@ -1,14 +1,8 @@
 <?php
 /**
- * @file
- * Test Generated API Example.
- * See bottom of this file for more detail.
- */
-
-/**
- * Test Generated example of using report_template getstatistics API.
+ * Test Generated example demonstrating the ReportTemplate.getstatistics API.
  *
- * Get Statistics from a report (note there isn't much data to get in the test DB :-(
+ * Get Statistics from a report (note there isn't much data to get in the test DB).
  *
  * @return array
  *   API result array
@@ -19,7 +13,7 @@ function report_template_getstatistics_example() {
   );
 
   try{
-    $result = civicrm_api3('report_template', 'getstatistics', $params);
+    $result = civicrm_api3('ReportTemplate', 'getstatistics', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -62,11 +56,10 @@ function report_template_getstatistics_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testReportTemplateGetStatisticsAllReports
-* and can be found in
+* The test that created it is called "testReportTemplateGetStatisticsAllReports"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php
 *
 * You can see the outcome of the API tests at
@@ -76,7 +69,7 @@ function report_template_getstatistics_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