[VersionBump] 2.0.0alpha0

Ran composer update and locale updater
This commit is contained in:
Diogo Cordeiro
2020-08-04 05:31:44 +01:00
parent 8ad928d48d
commit a9c365a5eb
229 changed files with 4505 additions and 13941 deletions

View File

@@ -133,6 +133,14 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase
</html>', $doc->saveXML());
}
public function testEntityAtEndOfFile()
{
$fragment = $this->parseFragment('&#');
$this->assertInstanceOf('DOMDocumentFragment', $fragment);
$this->assertSame('&#', $fragment->textContent);
$this->assertEquals('Line 1, Col 2: Expected &#DEC; &#HEX;, got EOF', $this->errors[0]);
}
public function testStrangeCapitalization()
{
$html = '<!doctype html>
@@ -707,4 +715,29 @@ EOM;
$this->assertSame('p', $audio->parentNode->nodeName);
$this->assertSame(3, $audio->childNodes->length);
}
public function testClosingBr()
{
$html = <<<EOM
<!DOCTYPE html>
<html>
<head>
<title>testClosingBr</title>
</head>
<body>
<p>
This line ends with a normal line break <br class="attribute-should-be-retained">
This line ends with a line break marked up as a closing tag </br class="attribute-should-be-discarded">
</p>
</body>
</html>>
</html>
EOM;
$dom = $this->parse($html);
$this->assertSame(2, $dom->getElementsByTagName('br')->length);
$this->assertSame(1, $dom->getElementsByTagName('br')->item(0)->attributes->length);
$this->assertSame(0, $dom->getElementsByTagName('br')->item(1)->attributes->length);
}
}