$tmpFile = $this->createTempDir() . CRM_Utils_File::makeFileName('CiviReport.csv');
$csvContent = CRM_Report_Utils_Report::makeCsv($reportObj, $rows);
file_put_contents($tmpFile, $csvContent);
- } catch (Exception $e) {
+ }
+ catch (Exception $e) {
// print_r($e->getCause()->getUserInfo());
CRM_Utils_GlobalStack::singleton()->pop();
throw $e;
}
/**
- * @param array $expectedCsvArray two-dimensional array representing a CSV table
- * @param array $actualCsvArray two-dimensional array representing a CSV table
+ * @param array $expectedCsvArray
+ * Two-dimensional array representing a CSV table.
+ * @param array $actualCsvArray
+ * Two-dimensional array representing a CSV table.
*/
public function assertCsvArraysEqual($expectedCsvArray, $actualCsvArray) {
// TODO provide better debug output
$this->assertEquals(
count($actualCsvArray[$intKey]),
count($expectedCsvArray[$intKey]),
- 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__. '; data: ' . $rowData
+ 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__ . '; data: ' . $rowData
);
$this->assertEquals($expectedCsvArray[$intKey], $strVal);
}