From: Ravish Nair Date: Thu, 8 Aug 2013 08:27:15 +0000 (+0530) Subject: -- CRM-13037 handled for GroupBy clause and for selecting the correct report object X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a76480e7aee51a1d2fcb14535904d30d4526bb63;p=civicrm-core.git -- CRM-13037 handled for GroupBy clause and for selecting the correct report object ---------------------------------------- * CRM-13037: Navigating among tabs produces wrong popups http://issues.civicrm.org/jira/browse/CRM-13037 --- diff --git a/tests/phpunit/CiviTest/CiviReportTestCase.php b/tests/phpunit/CiviTest/CiviReportTestCase.php index c1f5328991..e3f08cb7b0 100644 --- a/tests/phpunit/CiviTest/CiviReportTestCase.php +++ b/tests/phpunit/CiviTest/CiviReportTestCase.php @@ -45,7 +45,9 @@ class CiviReportTestCase extends CiviUnitTestCase { $config = CRM_Core_Config::singleton(); $config->keyDisable = TRUE; $controller = new CRM_Core_Controller_Simple($reportClass, ts('some title')); - $reportObj =& $controller->_pages['Detail']; //FIXME - Detail is going to change + $tmpReportVal = explode('_', $reportClass); + $reportName = array_pop($tmpReportVal); + $reportObj =& $controller->_pages[$reportName]; $tmpGlobals = array(); $tmpGlobals['_REQUEST']['force'] = 1; @@ -61,6 +63,11 @@ class CiviReportTestCase extends CiviUnitTestCase { $tmpGlobals['_GET'][$key] = $val; } } + if (!empty($inputParams['group_bys'])) { + $groupByFields = implode(' ', $inputParams['group_bys']); + $tmpGlobals['_GET']['gby'] = $groupByFields; + } + CRM_Utils_GlobalStack::singleton()->push($tmpGlobals); try {