You are here

public function OutputRulesTest::testProcessorInstruction in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php \Masterminds\HTML5\Tests\Serializer\OutputRulesTest::testProcessorInstruction()

File

vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php, line 575

Class

OutputRulesTest

Namespace

Masterminds\HTML5\Tests\Serializer

Code

public function testProcessorInstruction() {
  $dom = $this->html5
    ->loadHTMLFragment('<?foo bar ?>');
  $stream = fopen('php://temp', 'w');
  $r = new OutputRules($stream, $this->html5
    ->getOptions());
  $t = new Traverser($dom, $stream, $r, $this->html5
    ->getOptions());
  $r
    ->processorInstruction($dom->firstChild);
  $content = stream_get_contents($stream, -1, 0);
  $this
    ->assertRegExp('|<\\?foo bar \\?>|', $content);
}