X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fheaderparser002.phpt;fp=tests%2Fheaderparser002.phpt;h=c5a02f19778c4e0f705971b10e7e17175204ae55;hp=0000000000000000000000000000000000000000;hb=4f92a2983270a1fa41e400ff970576161baba5e6;hpb=950caf6998d2324cb98d795ea0957175f08984b8 diff --git a/tests/headerparser002.phpt b/tests/headerparser002.phpt new file mode 100644 index 0000000..c5a02f1 --- /dev/null +++ b/tests/headerparser002.phpt @@ -0,0 +1,59 @@ +--TEST-- +header parser errors +--SKIPIF-- + +--FILE-- +parse($header, http\Header\Parser::CLEANUP, $parsed), $parsed); +} +?> +===DONE=== +--EXPECTF-- +Test + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected character '\000' at pos 2 of 'Na\000me' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected end of line at pos 2 of 'Na\nme: value' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected character '\000' at pos 0 of '\000value' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected end of input at pos 5 of 'value' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected character '\000' at pos 3 of 'val\000ue' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} + +Warning: http\Header\Parser::parse(): Failed to parse headers: unexpected character '\000' at pos 5 of 'value\000' in %sheaderparser002.php on line %d +int(-1) +array(0) { +} +===DONE=== \ No newline at end of file