public function StringInputStreamTest::testInvalidReplace in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/test/HTML5/Parser/StringInputStreamTest.php \Masterminds\HTML5\Tests\Parser\StringInputStreamTest::testInvalidReplace()
File
- vendor/masterminds/html5/test/HTML5/Parser/StringInputStreamTest.php, line 197
Class
- StringInputStreamTest
Namespace
Masterminds\HTML5\Tests\Parser
Code
public function testInvalidReplace() {
$invalidTest = array(
"" => 'Overlong representation of U+0000',
"" => 'Overlong representation of U+0000',
"" => 'Overlong representation of U+0000',
"" => 'Overlong representation of U+0000',
"" => 'Overlong representation of U+0000',
"" => 'Overlong representation of U+007F',
"" => 'Overlong representation of U+07FF',
"" => 'Overlong representation of U+FFFF',
"" => 'Incomplete two byte sequence (missing final byte)',
"" => 'Incomplete three byte sequence (missing final byte)',
"" => 'Incomplete four byte sequence (missing final byte)',
"" => 'Lone 80 continuation byte',
"" => 'Lone BF continuation byte',
"" => 'Invalid FE byte',
"" => 'Invalid FF byte',
);
foreach ($invalidTest as $test => $note) {
$stream = new StringInputStream($test);
$this
->assertEquals('a', $stream
->remainingChars(), $note);
}
}