X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FExport%2FBAO%2FExport.php;h=a95df716d8f73142bfe454d3668ead18e346a5e0;hb=7aed0a9c53d51cc2f21f725d33d8dfb7aa1641c6;hp=b7f06d505bcda77850a1fdbaef2ed4e1ab05a46c;hpb=b6149515442c91268189cbdb61871c047f35e8b3;p=civicrm-core.git diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index b7f06d505b..a95df716d8 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -70,9 +70,6 @@ class CRM_Export_BAO_Export { * @param array $exportParams * @param string $queryOperator * - * @return array|null - * An array can be requested from within a unit test. - * * @throws \CRM_Core_Exception */ public static function exportComponents( @@ -118,6 +115,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c } $processor->setComponentTable($componentTable); $processor->setComponentClause($componentClause); + $processor->setIds($ids); list($query, $queryString) = $processor->runQuery($params, $order); @@ -205,15 +203,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c $processor->mergeSameAddress(); } - // In order to be able to write a unit test against this function we need to suppress - // the csv writing. In future hopefully the csv writing & the main processing will be in separate functions. - if (empty($exportParams['suppress_csv_for_testing'])) { - $processor->writeCSVFromTable(); - } - else { - // return tableName sqlColumns headerRows in test context - return [$processor->getTemporaryTable(), $sqlColumns, $processor->getHeaderRows(), $processor]; - } + $processor->writeCSVFromTable(); // delete the export temp table and component table $sql = "DROP TABLE IF EXISTS " . $processor->getTemporaryTable();