You are here

public function OutputRulesTest::getOutputRules 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::getOutputRules()
4 calls to OutputRulesTest::getOutputRules()
OutputRulesTest::testEnc in vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
Test basic encoding of text. @dataProvider getEncData
OutputRulesTest::testEscape in vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
Test basic encoding of text. @dataProvider getEncData
OutputRulesTest::testNl in vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php
OutputRulesTest::testWr in vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php

File

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

Class

OutputRulesTest

Namespace

Masterminds\HTML5\Tests\Serializer

Code

public function getOutputRules($options = array()) {
  $options = $options + $this->html5
    ->getOptions();
  $stream = fopen('php://temp', 'w');
  $dom = $this->html5
    ->loadHTML($this->markup);
  $r = new OutputRules($stream, $options);
  $t = new Traverser($dom, $stream, $r, $options);
  return array(
    $r,
    $stream,
  );
}