public function StringInputStreamTest::testInvalidParseError 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::testInvalidParseError()
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ StringInputStreamTest.php, line 236
Class
Namespace
Masterminds\HTML5\Tests\ParserCode
public function testInvalidParseError() {
// C0 controls (except U+0000 and U+000D due to different handling)
$this
->invalidParseErrorTestHandler("\1", 1, 'U+0001 (C0 control)');
$this
->invalidParseErrorTestHandler("\2", 1, 'U+0002 (C0 control)');
$this
->invalidParseErrorTestHandler("\3", 1, 'U+0003 (C0 control)');
$this
->invalidParseErrorTestHandler("\4", 1, 'U+0004 (C0 control)');
$this
->invalidParseErrorTestHandler("\5", 1, 'U+0005 (C0 control)');
$this
->invalidParseErrorTestHandler("\6", 1, 'U+0006 (C0 control)');
$this
->invalidParseErrorTestHandler("\7", 1, 'U+0007 (C0 control)');
$this
->invalidParseErrorTestHandler("\10", 1, 'U+0008 (C0 control)');
$this
->invalidParseErrorTestHandler("\t", 0, 'U+0009 (C0 control)');
$this
->invalidParseErrorTestHandler("\n", 0, 'U+000A (C0 control)');
$this
->invalidParseErrorTestHandler("\v", 1, 'U+000B (C0 control)');
$this
->invalidParseErrorTestHandler("\f", 0, 'U+000C (C0 control)');
$this
->invalidParseErrorTestHandler("\16", 1, 'U+000E (C0 control)');
$this
->invalidParseErrorTestHandler("\17", 1, 'U+000F (C0 control)');
$this
->invalidParseErrorTestHandler("\20", 1, 'U+0010 (C0 control)');
$this
->invalidParseErrorTestHandler("\21", 1, 'U+0011 (C0 control)');
$this
->invalidParseErrorTestHandler("\22", 1, 'U+0012 (C0 control)');
$this
->invalidParseErrorTestHandler("\23", 1, 'U+0013 (C0 control)');
$this
->invalidParseErrorTestHandler("\24", 1, 'U+0014 (C0 control)');
$this
->invalidParseErrorTestHandler("\25", 1, 'U+0015 (C0 control)');
$this
->invalidParseErrorTestHandler("\26", 1, 'U+0016 (C0 control)');
$this
->invalidParseErrorTestHandler("\27", 1, 'U+0017 (C0 control)');
$this
->invalidParseErrorTestHandler("\30", 1, 'U+0018 (C0 control)');
$this
->invalidParseErrorTestHandler("\31", 1, 'U+0019 (C0 control)');
$this
->invalidParseErrorTestHandler("\32", 1, 'U+001A (C0 control)');
$this
->invalidParseErrorTestHandler("\33", 1, 'U+001B (C0 control)');
$this
->invalidParseErrorTestHandler("\34", 1, 'U+001C (C0 control)');
$this
->invalidParseErrorTestHandler("\35", 1, 'U+001D (C0 control)');
$this
->invalidParseErrorTestHandler("\36", 1, 'U+001E (C0 control)');
$this
->invalidParseErrorTestHandler("\37", 1, 'U+001F (C0 control)');
// DEL (U+007F)
$this
->invalidParseErrorTestHandler("", 1, 'U+007F');
// C1 Controls
$this
->invalidParseErrorTestHandler("", 1, 'U+0080 (C1 control)');
$this
->invalidParseErrorTestHandler("", 1, 'U+009F (C1 control)');
$this
->invalidParseErrorTestHandler(" ", 0, 'U+00A0 (first codepoint above highest C1 control)');
// Charcters surrounding surrogates
$this
->invalidParseErrorTestHandler("", 0, 'U+D7FF (one codepoint below lowest surrogate codepoint)');
$this
->invalidParseErrorTestHandler("�", 0, 'U+DE00 (one codepoint above highest surrogate codepoint)');
// Permanent noncharacters
$this
->invalidParseErrorTestHandler("", 1, 'U+FDD0 (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+FDEF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+1FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+1FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+2FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+2FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+3FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+3FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+4FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+4FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+5FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+5FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+6FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+6FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+7FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+7FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+8FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+8FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+9FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+9FFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+AFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+AFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+BFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+BFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+CFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+CFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+DFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+DFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+EFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+EFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+FFFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+FFFFF (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+10FFFE (permanent noncharacter)');
$this
->invalidParseErrorTestHandler("", 1, 'U+10FFFF (permanent noncharacter)');
// MPB: These pass on some versions of iconv, and fail on others. Since we aren't in the
// business of writing tests against iconv, I've just commented these out. Should revisit
// at a later point.
/*
* $this->invalidParseErrorTestHandler("\xED\xA0\x80", 1, 'U+D800 (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xAD\xBF", 1, 'U+DB7F (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xAE\x80", 1, 'U+DB80 (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xAF\xBF", 1, 'U+DBFF (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xB0\x80", 1, 'U+DC00 (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xBE\x80", 1, 'U+DF80 (UTF-16 surrogate character)'); $this->invalidParseErrorTestHandler("\xED\xBF\xBF", 1, 'U+DFFF (UTF-16 surrogate character)'); // Paired UTF-16 surrogates $this->invalidParseErrorTestHandler("\xED\xA0\x80\xED\xB0\x80", 2, 'U+D800 U+DC00 (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xA0\x80\xED\xBF\xBF", 2, 'U+D800 U+DFFF (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAD\xBF\xED\xB0\x80", 2, 'U+DB7F U+DC00 (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAD\xBF\xED\xBF\xBF", 2, 'U+DB7F U+DFFF (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAE\x80\xED\xB0\x80", 2, 'U+DB80 U+DC00 (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAE\x80\xED\xBF\xBF", 2, 'U+DB80 U+DFFF (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAF\xBF\xED\xB0\x80", 2, 'U+DBFF U+DC00 (paired UTF-16 surrogates)'); $this->invalidParseErrorTestHandler("\xED\xAF\xBF\xED\xBF\xBF", 2, 'U+DBFF U+DFFF (paired UTF-16 surrogates)');
*/
}