diff options
author | Matt Butcher <[email protected]> | 2014-02-11 10:04:55 -0700 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2014-02-11 10:04:55 -0700 |
commit | 57801d5d2ed4439e24686d0c06771c5d54c39ea8 (patch) | |
tree | ceca8cefee56fed0b838b3171d66a46c0bfa211e | |
parent | 890cb84578d3b9a7ea63314a06f826a67be441d2 (diff) | |
parent | 7e8692116d64176fe653273b69cb7daa932650c4 (diff) |
Merge pull request #27 from miso-belica/fix-win-eol-tests
Fixed tests on Windows: changed "\n" -> PHP_EOL
-rw-r--r-- | test/HTML5/Serializer/OutputRulesTest.php | 7 |
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() { |