From 7e8692116d64176fe653273b69cb7daa932650c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1o=20Belica?= Date: Tue, 11 Feb 2014 13:33:12 +0100 Subject: 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. --- test/HTML5/Serializer/OutputRulesTest.php | 7 ++++--- 1 file 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("\nfoo\n", stream_get_contents($stream, -1, 0)); + $expected = '' . PHP_EOL . 'foo' . 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("\n", stream_get_contents($stream, -1, 0)); + $this->assertEquals("" . PHP_EOL, stream_get_contents($stream, -1, 0)); } function testElement() { -- cgit v1.2.3