You are here

protected function TreeBuildingRulesTest::parse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php \Masterminds\HTML5\Tests\Parser\TreeBuildingRulesTest::parse()

Convenience function for parsing.

3 calls to TreeBuildingRulesTest::parse()
TreeBuildingRulesTest::testHandleDT in vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php
TreeBuildingRulesTest::testHandleLI in vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php
TreeBuildingRulesTest::testTable in vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php

File

vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php, line 25
Test the Tree Builder's special-case rules.

Class

TreeBuildingRulesTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

protected function parse($string) {
  $treeBuilder = new DOMTreeBuilder();
  $scanner = new Scanner(new StringInputStream($string));
  $parser = new Tokenizer($scanner, $treeBuilder);
  $parser
    ->parse();
  return $treeBuilder
    ->document();
}