Permalink
Browse files

Fix tests that fail on windows.

Refs #2148
  • Loading branch information...
1 parent bd0104d commit 154b0015525642344d7a8e1931d32babec769e9d @markstory markstory committed Jan 25, 2012
@@ -329,9 +329,7 @@ public function testExportVar() {
float => (float) 1.333
}
TEXT;
- $result = str_replace(array("\r\n", "\n"), "", $result);
- $expected = str_replace(array("\r\n", "\n"), "", $expected);
- $this->assertEquals($expected, $result);
+ $this->assertTextEquals($expected, $result);
$data = array(
1 => 'Index one',
@@ -344,7 +342,7 @@ public function testExportVar() {
(int) 5 => 'Index five'
)
TEXT;
- $this->assertEquals($expected, $result);
+ $this->assertTextEquals($expected, $result);
}
/**
@@ -404,9 +402,7 @@ public function testDump() {
)
)</pre>
TEXT;
- $result = str_replace(array("\r\n", "\n"), "", $result);
- $expected = str_replace(array("\r\n", "\n"), "", $expected);
- $this->assertEquals($expected, $result);
+ $this->assertTextEquals($expected, $result);
}
/**
@@ -367,7 +367,7 @@ public function testStripScripts() {
HTML;
$expected = "text\n\ntext";
$result = Sanitize::stripScripts($string);
- $this->assertEquals($expected, $result);
+ $this->assertTextEquals($expected, $result);
$string = <<<HTML
text
@@ -380,7 +380,7 @@ public function testStripScripts() {
HTML;
$expected = "text\n\ntext";
$result = Sanitize::stripScripts($string);
- $this->assertEquals($expected, $result);
+ $this->assertTextEquals($expected, $result);
}
/**
@@ -315,7 +315,7 @@ public function testWrap() {
This is the song that never ends.
This is the song that never ends.
TEXT;
- $this->assertEquals($expected, $result, 'Text not wrapped.');
+ $this->assertTextEquals($expected, $result, 'Text not wrapped.');
$result = String::wrap($text, array('width' => 20, 'wordWrap' => false));
$expected = <<<TEXT
@@ -326,7 +326,7 @@ public function testWrap() {
the song that never
ends.
TEXT;
- $this->assertEquals($expected, $result, 'Text not wrapped.');
+ $this->assertTextEquals($expected, $result, 'Text not wrapped.');
}
/**
@@ -342,5 +342,6 @@ public function testWrapIndent() {
This is the song that never ends.
This is the song that never ends.
TEXT;
+ $this->assertTextEquals($expected, $result);
}
}

0 comments on commit 154b001

Please sign in to comment.