public function testSpecialCharactersAreProperlyEncoded($string, $messageExpected)
{
$output = new BufferedOutput();
$printer = new CSVPrinter();
$printer->configureOutput($output);
$printer->print(new IssueInstance(Issue::fromType(Issue::SyntaxError), 'test.php', 0, [$string]));
$printer->flush();
$expected = 'test.php,0,10,critical,UndefError,PhanSyntaxError,' . $messageExpected;
$actual = explode("\n", $output->fetch())[1];
// Ignore header
$this->assertEquals($expected, $actual);
}