summaryrefslogtreecommitdiff
path: root/test/HTML5/Serializer/OutputRulesTest.php
diff options
context:
space:
mode:
authorMatt Butcher <[email protected]>2014-02-11 09:56:01 -0700
committerMatt Butcher <[email protected]>2014-02-11 09:56:01 -0700
commit44e8e23626bf619844baf9983e931d2f58606377 (patch)
tree62625f63a954ab5a3f9bb4184039a68496e3896a /test/HTML5/Serializer/OutputRulesTest.php
parent77ad931cd824feb33eebae08cf3a5a47bce1e337 (diff)
parent3b691837c6d7a0969137048fbda274463d6b1d7c (diff)
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'test/HTML5/Serializer/OutputRulesTest.php')
-rw-r--r--test/HTML5/Serializer/OutputRulesTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php
index a451055..61e2d50 100644
--- a/test/HTML5/Serializer/OutputRulesTest.php
+++ b/test/HTML5/Serializer/OutputRulesTest.php
@@ -330,4 +330,15 @@ class OutputRulesTest extends \HTML5\Tests\TestCase {
$this->assertRegExp('|<csymbol definitionURL="http://www.example.com/mathops/multiops.html#plusminus">|', $content);
}
+ function testProcessorInstruction() {
+ $dom = \HTML5::loadHTMLFragment('<?foo bar ?>');
+
+ $stream = fopen('php://temp', 'w');
+ $r = new OutputRules($stream, \HTML5::options());
+ $t = new Traverser($dom, $stream, $r, \HTML5::options());
+
+ $r->processorInstruction($dom->firstChild);
+ $content = stream_get_contents($stream, -1, 0);
+ $this->assertRegExp('|<\?foo bar \?>|', $content);
+ }
}