summaryrefslogtreecommitdiff
path: root/test/HTML5/Serializer/OutputRulesTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/HTML5/Serializer/OutputRulesTest.php')
-rw-r--r--test/HTML5/Serializer/OutputRulesTest.php6
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('&lt;script&gt;alert("hi");&lt;/script&gt;', stream_get_contents($stream, - 1, 0));
}