Fix tests that fail on windows.

Refs #2148
This commit is contained in:
mark_story 2012-01-24 21:12:26 -05:00
parent bd0104d972
commit 154b001552
3 changed files with 8 additions and 11 deletions

View file

@ -329,9 +329,7 @@ object(View) {
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 @@ array(
(int) 5 => 'Index five'
)
TEXT;
$this->assertEquals($expected, $result);
$this->assertTextEquals($expected, $result);
}
/**
@ -404,9 +402,7 @@ TEXT;
)
)</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);
}
/**

View file

@ -367,7 +367,7 @@ text
HTML;
$expected = "text\n\ntext";
$result = Sanitize::stripScripts($string);
$this->assertEquals($expected, $result);
$this->assertTextEquals($expected, $result);
$string = <<<HTML
text
@ -380,7 +380,7 @@ text
HTML;
$expected = "text\n\ntext";
$result = Sanitize::stripScripts($string);
$this->assertEquals($expected, $result);
$this->assertTextEquals($expected, $result);
}
/**

View file

@ -315,7 +315,7 @@ This is the song that never ends.
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 @@ ever ends. This is
the song that never
ends.
TEXT;
$this->assertEquals($expected, $result, 'Text not wrapped.');
$this->assertTextEquals($expected, $result, 'Text not wrapped.');
}
/**
@ -342,5 +342,6 @@ This is the song that never ends.
This is the song that never ends.
This is the song that never ends.
TEXT;
$this->assertTextEquals($expected, $result);
}
}