You are here

protected function DOMTreeBuilderTest::parse in Zircon Profile 8

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

Convenience function for parsing.

26 calls to DOMTreeBuilderTest::parse()
DOMTreeBuilderTest::testAttributes in vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
DOMTreeBuilderTest::testAutocloseLI in vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
DOMTreeBuilderTest::testAutocloseP in vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
DOMTreeBuilderTest::testCDATA in vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php
DOMTreeBuilderTest::testComment in vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php

... See full list

File

vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php, line 22
Test the Tree Builder.

Class

DOMTreeBuilderTest
These tests are functional, not necessarily unit tests.

Namespace

Masterminds\HTML5\Tests\Parser

Code

protected function parse($string, array $options = array()) {
  $treeBuilder = new DOMTreeBuilder(false, $options);
  $input = new StringInputStream($string);
  $scanner = new Scanner($input);
  $parser = new Tokenizer($scanner, $treeBuilder);
  $parser
    ->parse();
  $this->errors = $treeBuilder
    ->getErrors();
  return $treeBuilder
    ->document();
}