Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Dec 20, 2023
1 parent b368454 commit 78ff81a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/PHPUnit/Unit/DataTable/Renderer/CSVTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ public function testCSVRendererCorrectlyEscapesHeadersAndValues()
$dataTable = $this->_getDataTableSimpleWithCommasInCells();
$render = new Csv();
$render->setTable($dataTable);
$render->setSeparator('#');
$render->convertToUnicode = false;

$expected = '"col,1","col,2"
"val""1","val"",2"';
$expected = '"col,1"#"col;2"
"val""1"#"val"",2"
val#"val#2"';
$actual = $render->render();
$this->assertEquals($expected, $actual);
}
Expand Down Expand Up @@ -468,7 +470,8 @@ private function _getDataTableSimpleWithCommasInCells()
{
$table = new DataTable();
$table->addRowsFromSimpleArray(array(
array("col,1" => "val\"1", "col,2" => "val\",2")
array("col,1" => "val\"1", "col;2" => "val\",2"),
array("col,1" => "val", "col;2" => "val#2")
));
return $table;
}
Expand Down

0 comments on commit 78ff81a

Please sign in to comment.