From 132ffae1d6ea229d51f33357914752d1508052b2 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 26 Sep 2007 15:33:23 +0000 Subject: [PATCH] - fixup testsuite --- tests/build_url_003.phpt | 1 + tests/match_request_header_001.phpt | 1 + tests/negotiation_001.phpt | 1 + tests/ob_deflatehandler_001.phpt | 1 + tests/parse_cookie_001.phpt | 2 +- tests/parse_cookie_002.phpt | 1 + tests/parse_message_001.phpt | 3 ++- tests/parse_message_004.phpt | 8 ++++---- tests/parse_params_001.phpt | 12 ++++++------ tests/request_gzip.phpt | 2 +- tests/request_put_data.phpt | 5 ++++- tests/send_data_001.phpt | 1 + tests/send_data_002.phpt | 1 + tests/send_data_003.phpt | 1 + tests/send_data_004.phpt | 1 + tests/send_data_005.phpt | 1 + tests/send_data_006.phpt | 1 + tests/send_data_007.phpt | 1 + tests/send_data_008.phpt | 1 + tests/send_file_005.phpt | 1 + tests/send_ifrange_001.phpt | 1 + tests/send_ifrange_003.phpt | 1 + tests/skip.inc | 3 +++ tests/stream_filters_001.phpt | 1 + 24 files changed, 38 insertions(+), 14 deletions(-) diff --git a/tests/build_url_003.phpt b/tests/build_url_003.phpt index cd9c0a3..cb2d84f 100644 --- a/tests/build_url_003.phpt +++ b/tests/build_url_003.phpt @@ -3,6 +3,7 @@ http_build_url() --SKIPIF-- --ENV-- HTTP_HOST=www.example.com diff --git a/tests/match_request_header_001.phpt b/tests/match_request_header_001.phpt index 2d0f47e..b832f34 100644 --- a/tests/match_request_header_001.phpt +++ b/tests/match_request_header_001.phpt @@ -3,6 +3,7 @@ http_match_request_header() --SKIPIF-- --ENV-- HTTP_FOO=bar diff --git a/tests/negotiation_001.phpt b/tests/negotiation_001.phpt index 3641455..89a8e49 100644 --- a/tests/negotiation_001.phpt +++ b/tests/negotiation_001.phpt @@ -3,6 +3,7 @@ negotiation --SKIPIF-- --ENV-- HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8 diff --git a/tests/ob_deflatehandler_001.phpt b/tests/ob_deflatehandler_001.phpt index ba39581..2d7a059 100644 --- a/tests/ob_deflatehandler_001.phpt +++ b/tests/ob_deflatehandler_001.phpt @@ -4,6 +4,7 @@ ob_deflatehandler --ENV-- diff --git a/tests/parse_cookie_001.phpt b/tests/parse_cookie_001.phpt index d17c78d..a3dbe60 100644 --- a/tests/parse_cookie_001.phpt +++ b/tests/parse_cookie_001.phpt @@ -14,7 +14,7 @@ echo "Done\n"; ?> --EXPECTF-- %sTEST -object(stdClass)#%d (%d) { +object(stdClass)%s { ["cookies"]=> array(3) { ["name"]=> diff --git a/tests/parse_cookie_002.phpt b/tests/parse_cookie_002.phpt index 3aa38f2..f40c823 100644 --- a/tests/parse_cookie_002.phpt +++ b/tests/parse_cookie_002.phpt @@ -3,6 +3,7 @@ parse cookie --SKIPIF-- --FILE-- body; +$m = http_parse_message(http_get('http://www.google.com')); +echo $m->body; echo "Done\n"; --EXPECTF-- %sTEST diff --git a/tests/parse_message_004.phpt b/tests/parse_message_004.phpt index 653d083..759065c 100644 --- a/tests/parse_message_004.phpt +++ b/tests/parse_message_004.phpt @@ -31,7 +31,7 @@ echo "Done\n"; ?> --EXPECTF-- %sTEST -object(stdClass)#1 (7) { +object(stdClass)%s { ["type"]=> int(2) ["httpVersion"]=> @@ -50,7 +50,7 @@ object(stdClass)#1 (7) { ["body"]=> string(10) "1234567890" ["parentMessage"]=> - object(stdClass)#2 (7) { + object(stdClass)%s { ["type"]=> int(1) ["httpVersion"]=> @@ -69,7 +69,7 @@ object(stdClass)#1 (7) { ["body"]=> string(0) "" ["parentMessage"]=> - object(stdClass)#3 (7) { + object(stdClass)%s { ["type"]=> int(2) ["httpVersion"]=> @@ -88,7 +88,7 @@ object(stdClass)#1 (7) { ["body"]=> string(0) "" ["parentMessage"]=> - object(stdClass)#4 (7) { + object(stdClass)%s { ["type"]=> int(1) ["httpVersion"]=> diff --git a/tests/parse_params_001.phpt b/tests/parse_params_001.phpt index 1dc452e..dde2780 100644 --- a/tests/parse_params_001.phpt +++ b/tests/parse_params_001.phpt @@ -11,12 +11,12 @@ var_dump(http_parse_params('text/html; charset=iso-8859-1')); var_dump(http_parse_params('text/html; charset="iso-8859-1"')); var_dump(http_parse_params('attachment; filename="gol;got,a.ext"')); var_dump(http_parse_params('public, must-revalidate, max-age=0')); -var_dump(http_parse_params('a')->params[0]); -var_dump(http_parse_params('a=b')->params[0]); +$p = http_parse_params('a'); var_dump($p->params[0]); +$p = http_parse_params('a=b'); var_dump($p->params[0]); echo "Done\n"; --EXPECTF-- %sTEST -object(stdClass)#%d (%d) { +object(stdClass)%s { ["params"]=> array(2) { [0]=> @@ -28,7 +28,7 @@ object(stdClass)#%d (%d) { } } } -object(stdClass)#%d (%d) { +object(stdClass)%s { ["params"]=> array(2) { [0]=> @@ -40,7 +40,7 @@ object(stdClass)#%d (%d) { } } } -object(stdClass)#%d (%d) { +object(stdClass)%s { ["params"]=> array(2) { [0]=> @@ -52,7 +52,7 @@ object(stdClass)#%d (%d) { } } } -object(stdClass)#%d (%d) { +object(stdClass)%s { ["params"]=> array(3) { [0]=> diff --git a/tests/request_gzip.phpt b/tests/request_gzip.phpt index 4493d8c..7855a6f 100644 --- a/tests/request_gzip.phpt +++ b/tests/request_gzip.phpt @@ -15,7 +15,7 @@ var_dump(http_parse_message(http_get('http://dev.iworks.at/ext-http/.print_reque echo "Done\n"; --EXPECTF-- %sTEST -object(stdClass)#%d (%d) { +object(stdClass)%s { ["type"]=> int(2) ["httpVersion"]=> diff --git a/tests/request_put_data.phpt b/tests/request_put_data.phpt index be90a82..bd81a1e 100644 --- a/tests/request_put_data.phpt +++ b/tests/request_put_data.phpt @@ -9,7 +9,10 @@ skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support"); CURLBUF_SIZE */)))->body); +$data = str_repeat("abc", 6000/* > CURLBUF_SIZE */); +$resp = http_put_data("http://dev.iworks.at/ext-http/.print_put.php5", $data); +$mess = http_parse_message($resp); +var_dump($data === $mess->body); echo "Done\n"; ?> diff --git a/tests/send_data_001.phpt b/tests/send_data_001.phpt index e5c6840..21c8d5c 100644 --- a/tests/send_data_001.phpt +++ b/tests/send_data_001.phpt @@ -4,6 +4,7 @@ http_send_data() NIL-NUM range --ENV-- HTTP_RANGE=bytes=-5 diff --git a/tests/send_data_002.phpt b/tests/send_data_002.phpt index af7e866..e178041 100644 --- a/tests/send_data_002.phpt +++ b/tests/send_data_002.phpt @@ -4,6 +4,7 @@ http_send_data() NUM-NUM range --ENV-- HTTP_RANGE=bytes=5-6 diff --git a/tests/send_data_003.phpt b/tests/send_data_003.phpt index c13ec80..06bc267 100644 --- a/tests/send_data_003.phpt +++ b/tests/send_data_003.phpt @@ -4,6 +4,7 @@ http_send_data() NUM-NIL range --ENV-- HTTP_RANGE=bytes=5981- diff --git a/tests/send_data_004.phpt b/tests/send_data_004.phpt index 6237a42..12223fd 100644 --- a/tests/send_data_004.phpt +++ b/tests/send_data_004.phpt @@ -4,6 +4,7 @@ http_send_data() syntactically invalid range --ENV-- HTTP_RANGE=bytes=123,-wtf ? diff --git a/tests/send_data_005.phpt b/tests/send_data_005.phpt index 28cbb78..4359efb 100644 --- a/tests/send_data_005.phpt +++ b/tests/send_data_005.phpt @@ -4,6 +4,7 @@ http_send_data() oversized range --ENV-- HTTP_RANGE=bytes=5990-6000 diff --git a/tests/send_data_006.phpt b/tests/send_data_006.phpt index 43d7a93..a8ab006 100644 --- a/tests/send_data_006.phpt +++ b/tests/send_data_006.phpt @@ -4,6 +4,7 @@ http_send_data() multiple ranges --ENV-- HTTP_RANGE=bytes=0-3, 4-5,9-11 diff --git a/tests/send_data_007.phpt b/tests/send_data_007.phpt index 91dedaa..a073661 100644 --- a/tests/send_data_007.phpt +++ b/tests/send_data_007.phpt @@ -4,6 +4,7 @@ http_send_data() NIL-NIL range --ENV-- HTTP_RANGE=bytes=0-0 diff --git a/tests/send_data_008.phpt b/tests/send_data_008.phpt index 7de621d..a3f1962 100644 --- a/tests/send_data_008.phpt +++ b/tests/send_data_008.phpt @@ -4,6 +4,7 @@ http_send_data() multiple ranges --ENV-- HTTP_RANGE=bytes=0-0,-1 diff --git a/tests/send_file_005.phpt b/tests/send_file_005.phpt index d6705ea..292df3c 100644 --- a/tests/send_file_005.phpt +++ b/tests/send_file_005.phpt @@ -4,6 +4,7 @@ http_send_file() multiple ranges --ENV-- HTTP_RANGE=bytes=0-3, 4-5,9-11 diff --git a/tests/send_ifrange_001.phpt b/tests/send_ifrange_001.phpt index 9b36971..8f85abf 100644 --- a/tests/send_ifrange_001.phpt +++ b/tests/send_ifrange_001.phpt @@ -4,6 +4,7 @@ http_send() If-Range --ENV-- HTTP_RANGE=bytes=0-1 diff --git a/tests/send_ifrange_003.phpt b/tests/send_ifrange_003.phpt index 746d9c7..e3ea8ea 100644 --- a/tests/send_ifrange_003.phpt +++ b/tests/send_ifrange_003.phpt @@ -4,6 +4,7 @@ http_send() If-Range --ENV-- HTTP_RANGE=bytes=0-1 diff --git a/tests/skip.inc b/tests/skip.inc index 5665d5d..63ae05c 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -1,5 +1,8 @@ --FILE--