_columnHeaders = [ 'civicrm_activity_activity_type_id' => [ 'title' => 'Activity Type', 'type' => 2, ], 'civicrm_activity_activity_subject' => [ 'title' => 'Subject', 'type' => 2, ], 'civicrm_activity_details' => [ 'title' => 'Activity Details', 'type' => NULL, ], ]; $details = <<Here's some typical data from an activity details field.

дè some non-ascii and html styling and these ̋“weird” quotes’s.

Also some named entities "hello". And & é. Also some math like 2 < 4.

ENDDETAILS; $expectedOutput = << 'Meeting', 'civicrm_activity_activity_subject' => 'Meeting with the apostrophe\'s and that person who does "air quotes". Some non-ascii characters: дè', 'civicrm_activity_details' => $details, ], ]; $csvString = CRM_Report_Utils_Report::makeCsv($form, $rows); $this->assertEquals($expectedOutput, $csvString); } }