Skip to content

Commit

Permalink
Fix tests that fail on windows.
Browse files Browse the repository at this point in the history
Refs #2148
  • Loading branch information
markstory committed Jan 25, 2012
1 parent bd0104d commit 154b001
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
10 changes: 3 additions & 7 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -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',
Expand All @@ -344,7 +342,7 @@ public function testExportVar() {
(int) 5 => 'Index five'
)
TEXT;
$this->assertEquals($expected, $result);
$this->assertTextEquals($expected, $result);
}

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Utility/SanitizeTest.php
Expand Up @@ -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
Expand All @@ -380,7 +380,7 @@ public function testStripScripts() {
HTML;
$expected = "text\n\ntext";
$result = Sanitize::stripScripts($string);
$this->assertEquals($expected, $result);
$this->assertTextEquals($expected, $result);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions lib/Cake/Test/Case/Utility/StringTest.php
Expand Up @@ -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
Expand All @@ -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.');
}

/**
Expand All @@ -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.