diff options
author | Asmir Mustafic <[email protected]> | 2014-06-26 15:19:38 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2014-06-26 15:19:38 +0200 |
commit | 45e0f801d896258022c6a70a7738b991cb19aafe (patch) | |
tree | 6bf597ab357e0de4385dd216ef612fd4b5a36b3c /test/HTML5/Serializer/OutputRulesTest.php | |
parent | 3959083837c7d2bfa6e922980b4a58faa68e5176 (diff) |
Added compatibility with Facebook HHVM 3.2
Diffstat (limited to 'test/HTML5/Serializer/OutputRulesTest.php')
-rw-r--r-- | test/HTML5/Serializer/OutputRulesTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php index a54a754..f12acbb 100644 --- a/test/HTML5/Serializer/OutputRulesTest.php +++ b/test/HTML5/Serializer/OutputRulesTest.php @@ -330,14 +330,14 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase <html lang="en"> <head id="foo"></head> </html>'); - $dom->getElementById('foo')->appendChild(new \DOMText('<script>alert("hi");</script>')); + $foo = $dom->getElementById('foo'); + $foo->appendChild(new \DOMText('<script>alert("hi");</script>')); $stream = fopen('php://temp', 'w'); $r = new OutputRules($stream, $this->html5->getOptions()); $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); - $item = $dom->getElementById('foo'); - $r->text($item->firstChild); + $r->text($foo->firstChild); $this->assertEquals('<script>alert("hi");</script>', stream_get_contents($stream, - 1, 0)); } |