summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMišo Belica <[email protected]>2014-02-11 13:33:12 +0100
committerMišo Belica <[email protected]>2014-02-11 13:33:12 +0100
commit7e8692116d64176fe653273b69cb7daa932650c4 (patch)
tree67aec17205f21b8e43496a59f2e80a3ed80cafd6
parent3b691837c6d7a0969137048fbda274463d6b1d7c (diff)
Fixed tests on Windows: changed "\n" -> PHP_EOL
New lines are represented by "\r\n" characters on Windows so tests relying on "\n" are failing.
-rw-r--r--test/HTML5/Serializer/OutputRulesTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php
index 61e2d50..0c85492 100644
--- a/test/HTML5/Serializer/OutputRulesTest.php
+++ b/test/HTML5/Serializer/OutputRulesTest.php
@@ -22,7 +22,7 @@ class OutputRulesTest extends \HTML5\Tests\TestCase {
/**
* Using reflection we make a protected method accessible for testing.
- *
+ *
* @param string $name
* The name of the method on the Traverser class to test.
*
@@ -61,7 +61,8 @@ class OutputRulesTest extends \HTML5\Tests\TestCase {
$t = new Traverser($dom, $stream, $r, \HTML5::options());
$r->document($dom);
- $this->assertEquals("<!DOCTYPE html>\n<html lang=\"en\"><body>foo</body></html>\n", stream_get_contents($stream, -1, 0));
+ $expected = '<!DOCTYPE html>' . PHP_EOL . '<html lang="en"><body>foo</body></html>' . PHP_EOL;
+ $this->assertEquals($expected, stream_get_contents($stream, -1, 0));
}
function testDoctype() {
@@ -73,7 +74,7 @@ class OutputRulesTest extends \HTML5\Tests\TestCase {
$m = $this->getProtectedMethod('doctype');
$m->invoke($r, 'foo');
- $this->assertEquals("<!DOCTYPE html>\n", stream_get_contents($stream, -1, 0));
+ $this->assertEquals("<!DOCTYPE html>" . PHP_EOL, stream_get_contents($stream, -1, 0));
}
function testElement() {