Skip to content
This repository
Browse code

MINOR Fixed broken CSVParserTest on Windows because of newline charac…

…ter differences
  • Loading branch information...
commit b559b9ba53c7efc2521a503c2a6312d5e0569cd7 1 parent 201506e
Sean Harvey authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  tests/dev/CSVParserTest.php
6  tests/dev/CSVParserTest.php
@@ -19,7 +19,7 @@ function testParsingWithHeaders() {
19 19
 		
20 20
 		$this->assertEquals(array(
21 21
 			"He's a good guy",
22  
-			"She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography",
  22
+			sprintf("She is awesome.%sSo awesome that she gets multiple rows and \"escaped\" strings in her biography", PHP_EOL),
23 23
 			"Pretty old, with an escaped comma",
24 24
 			"Unicode FTW"), $biographies);
25 25
 		$this->assertEquals(array("31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays);
@@ -49,7 +49,7 @@ function testParsingWithHeadersAndColumnMap() {
49 49
 		$this->assertEquals(array('John','Jane','Jamie','Järg'), $firstNames);
50 50
 		$this->assertEquals(array(
51 51
 			"He's a good guy",
52  
-			"She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography",
  52
+			sprintf("She is awesome.%sSo awesome that she gets multiple rows and \"escaped\" strings in her biography", PHP_EOL),
53 53
 			"Pretty old, with an escaped comma",
54 54
 			"Unicode FTW"), $biographies);
55 55
 		$this->assertEquals(array("31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays);
@@ -77,7 +77,7 @@ function testParsingWithExplicitHeaderRow() {
77 77
 		$this->assertEquals(array(
78 78
 			'Biography',
79 79
 			"He's a good guy",
80  
-			"She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography",
  80
+			sprintf("She is awesome.%sSo awesome that she gets multiple rows and \"escaped\" strings in her biography", PHP_EOL),
81 81
 			"Pretty old, with an escaped comma",
82 82
 			"Unicode FTW"), $biographies);
83 83
 		$this->assertEquals(array("Birthday","31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays);

0 notes on commit b559b9b

Please sign in to comment.
Something went wrong with that request. Please try again.