Merge pull request #5536 from totten/4.5-httpclient
[civicrm-core.git] / tests / phpunit / api / v3 / ReportTemplateTest.php
index 6108fa53ed83a6f84d29f5c11411ad6343e03825..75f7a978434231f01ba765a35d4be03c73030fc0 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -112,9 +112,10 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
   }
 
   /**
+   * Test getrows on contact summary report.
    */
   public function testReportTemplateGetRowsContactSummary() {
-    $description = "Retrieve rows from a report template (optionally providing the instance_id)";
+    $description = "Retrieve rows from a report template (optionally providing the instance_id).";
     $result = $this->callAPIAndDocument('report_template', 'getrows', array(
       'report_id' => 'contact/summary',
       'options' => array('metadata' => array('labels', 'title')),
@@ -135,22 +136,30 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
   }
 
   /**
+   * Tet api to get rows from reports.
+   *
    * @dataProvider getReportTemplates
+   *
    * @param $reportID
+   *
    * @throws \PHPUnit_Framework_IncompleteTestError
    */
   public function testReportTemplateGetRowsAllReports($reportID) {
     if (stristr($reportID, 'has existing issues')) {
       $this->markTestIncomplete($reportID);
     }
-    $result = $this->callAPISuccess('report_template', 'getrows', array(
+    $this->callAPISuccess('report_template', 'getrows', array(
       'report_id' => $reportID,
     ));
   }
 
   /**
+   * Test get statistics.
+   *
    * @dataProvider getReportTemplates
+   *
    * @param $reportID
+   *
    * @throws \PHPUnit_Framework_IncompleteTestError
    */
   public function testReportTemplateGetStatisticsAllReports($reportID) {
@@ -160,14 +169,16 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
     if (in_array($reportID, array('contribute/softcredit', 'contribute/bookkeeping'))) {
       $this->markTestIncomplete($reportID . " has non enotices when calling statistics fn");
     }
-    $description = "Get Statistics from a report (note there isn't much data to get in the test DB :-(";
+    $description = "Get Statistics from a report (note there isn't much data to get in the test DB).";
     $result = $this->callAPIAndDocument('report_template', 'getstatistics', array(
       'report_id' => $reportID,
     ), __FUNCTION__, __FILE__, $description, 'Getstatistics', 'getstatistics');
   }
 
   /**
-   * Data provider function for getting all templates, note that the function needs to
+   * Data provider function for getting all templates.
+   *
+   * Note that the function needs to
    * be static so cannot use $this->callAPISuccess
    */
   public static function getReportTemplates() {