public function DOMTreeBuilderTest::testRegressionHTMLNoBody in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php \Masterminds\HTML5\Tests\Parser\DOMTreeBuilderTest::testRegressionHTMLNoBody()
Regression for issue #13
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ DOMTreeBuilderTest.php, line 503 - Test the Tree Builder.
Class
- DOMTreeBuilderTest
- These tests are functional, not necessarily unit tests.
Namespace
Masterminds\HTML5\Tests\ParserCode
public function testRegressionHTMLNoBody() {
$html = '<!DOCTYPE html><html><span id="test">Test</span></html>';
$doc = $this
->parse($html);
$span = $doc
->getElementById('test');
$this
->assertEmpty($this->errors);
$this
->assertEquals('span', $span->tagName);
$this
->assertEquals('Test', $span->textContent);
}