protected function TreeBuildingRulesTest::parseFragment in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php \Masterminds\HTML5\Tests\Parser\TreeBuildingRulesTest::parseFragment()
Convenience function for parsing fragments.
1 call to TreeBuildingRulesTest::parseFragment()
- TreeBuildingRulesTest::testTDFragment in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TreeBuildingRulesTest.php
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TreeBuildingRulesTest.php, line 37 - Test the Tree Builder's special-case rules.
Class
- TreeBuildingRulesTest
- These tests are functional, not necessarily unit tests.
Namespace
Masterminds\HTML5\Tests\ParserCode
protected function parseFragment($string) {
$events = new DOMTreeBuilder(true);
$scanner = new Scanner(new StringInputStream($string));
$parser = new Tokenizer($scanner, $events);
$parser
->parse();
return $events
->fragment();
}