From 45e0f801d896258022c6a70a7738b991cb19aafe Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Thu, 26 Jun 2014 15:19:38 +0200 Subject: Added compatibility with Facebook HHVM 3.2 --- test/HTML5/Serializer/OutputRulesTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/HTML5/Serializer') 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 '); - $dom->getElementById('foo')->appendChild(new \DOMText('')); + $foo = $dom->getElementById('foo'); + $foo->appendChild(new \DOMText('')); $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)); } -- cgit v1.2.3