From 99b27b9e44043e5ff1bd53f2a1e3b007cfd16a42 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 7 Feb 2008 15:09:50 +0000 Subject: [PATCH] upgrade test suite to 5.3 --- tests/HttpMessage_001.phpt | 4 +- tests/HttpMessage_002.phpt | 6 +- tests/HttpMessage_003.phpt | 22 +++--- tests/HttpMessage_004.phpt | 2 +- tests/HttpMessage_005.phpt | 2 +- tests/HttpMessage_006.phpt | 2 +- tests/HttpMessage_007.phpt | 2 +- tests/HttpQueryString_001.phpt | 8 +- tests/HttpQueryString_002.phpt | 8 +- tests/HttpQueryString_003.phpt | 4 +- tests/HttpQueryString_004.phpt | 26 +++++-- tests/HttpRequestDataShare_001.phpt | 2 +- tests/HttpRequestDataShare_002.phpt | 2 +- tests/HttpRequestPool_001.phpt | 4 +- tests/HttpRequestPool_003.phpt | 2 +- tests/HttpRequestPool_004.phpt | 4 +- tests/HttpRequestPool_005.phpt | 4 +- tests/HttpRequestPool_006.phpt | 14 ++-- tests/HttpRequestPool_007.phpt | 102 ++++++++++++------------- tests/HttpRequest_001.phpt | 4 +- tests/HttpRequest_002.phpt | 10 +-- tests/HttpRequest_003.phpt | 4 +- tests/HttpRequest_004.phpt | 2 +- tests/HttpRequest_005.phpt | 2 +- tests/HttpRequest_006.phpt | 8 +- tests/HttpRequest_007.phpt | 10 +-- tests/HttpRequest_008.phpt | 4 +- tests/HttpRequest_009.phpt | 4 +- tests/HttpRequest_010.phpt | 4 +- tests/HttpResponse_001.phpt | 8 +- tests/HttpResponse_002.phpt | 8 +- tests/HttpResponse_003.phpt | 12 +-- tests/HttpResponse_004.phpt | 4 +- tests/HttpResponse_005.phpt | 4 +- tests/allowed_methods_002.phpt | 8 +- tests/allowed_methods_002_logging.phpt | 6 +- tests/build_str_001.phpt | 2 +- tests/build_url_001.phpt | 6 +- tests/build_url_002.phpt | 2 +- tests/build_url_003.phpt | 4 +- tests/build_url_004.phpt | 2 +- tests/chunked_decode_001.phpt | 2 +- tests/chunked_decode_002.phpt | 2 +- tests/chunked_decode_003.phpt | 4 +- tests/chunked_decode_004.phpt | 2 +- tests/cloning_001.phpt | 4 +- tests/date_001.phpt | 2 +- tests/date_002.phpt | 4 +- tests/encoding_objects_001.phpt | 2 +- tests/encodings.phpt | 2 +- tests/etag_mode_031.phpt | 6 +- tests/etag_mode_032.phpt | 6 +- tests/etag_mode_033.phpt | 6 +- tests/etag_mode_034.phpt | 6 +- tests/etag_mode_041.phpt | 6 +- tests/etag_mode_042.phpt | 6 +- tests/etag_mode_043.phpt | 6 +- tests/etag_mode_044.phpt | 6 +- tests/exceptions.phpt | 4 +- tests/get_request_data_001.phpt | 2 +- tests/match_request_header_001.phpt | 4 +- tests/negotiation_001.phpt | 4 +- tests/ob_deflatehandler_001.phpt | 6 +- tests/ob_inflatehandler_001.phpt | 2 +- tests/parse_cookie_001.phpt | 4 +- tests/parse_cookie_002.phpt | 4 +- tests/parse_headers_001.phpt | 2 +- tests/parse_message_001.phpt | 4 +- tests/parse_message_002.phpt | 2 +- tests/parse_message_003.phpt | 4 +- tests/parse_message_004.phpt | 10 +-- tests/parse_message_005.phpt | 2 +- tests/parse_params_001.phpt | 10 +-- tests/persistent_handles_001.phpt | 4 +- tests/persistent_handles_002.phpt | 6 +- tests/persistent_handles_003.phpt | 4 +- tests/redirect_011.phpt | 8 +- tests/redirect_011_logging.phpt | 6 +- tests/redirect_012.phpt | 18 ++--- tests/redirect_012_logging.phpt | 6 +- tests/redirect_013.phpt | 8 +- tests/redirect_013_logging.phpt | 6 +- tests/request_cookies.phpt | 10 +-- tests/request_etag.phpt | 6 +- tests/request_gzip.phpt | 6 +- tests/request_methods.phpt | 2 +- tests/request_put_data.phpt | 2 +- tests/send_data_001.phpt | 4 +- tests/send_data_002.phpt | 4 +- tests/send_data_003.phpt | 4 +- tests/send_data_005.phpt | 5 +- tests/send_data_006.phpt | 4 +- tests/send_data_007.phpt | 4 +- tests/send_data_008.phpt | 4 +- tests/send_failed_precond_001.phpt | 2 +- tests/send_file_005.phpt | 4 +- tests/send_file_006.phpt | 4 +- tests/send_file_007.phpt | 4 +- tests/send_file_009.phpt | 4 +- tests/send_file_010.phpt | 4 +- tests/send_file_011.phpt | 4 +- tests/send_file_013.phpt | 3 +- tests/send_ifrange_001.phpt | 4 +- tests/send_ifrange_003.phpt | 4 +- tests/stream_filters_001.phpt | 4 +- tests/stream_filters_002.phpt | 2 +- tests/stream_filters_003.phpt | 4 +- 107 files changed, 326 insertions(+), 316 deletions(-) diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index e787523..8f711c1 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -3,7 +3,7 @@ HttpMessage --SKIPIF-- --FILE-- --EXPECTF-- -%sTEST +%aTEST string(15) "Partial content" string(1) "X" string(190) "HTTP/1.1 301 diff --git a/tests/HttpMessage_002.phpt b/tests/HttpMessage_002.phpt index d1fd173..65c1b6c 100644 --- a/tests/HttpMessage_002.phpt +++ b/tests/HttpMessage_002.phpt @@ -3,7 +3,7 @@ HttpMessage properties --SKIPIF-- --FILE-- @@ -25,8 +25,8 @@ $m->test(); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Array ( ) -%sFatal error%sCannot access HttpMessage properties by reference or array key/index in%s +%aFatal error%aCannot access HttpMessage properties by reference or array key/index in%a diff --git a/tests/HttpMessage_003.phpt b/tests/HttpMessage_003.phpt index 8c416b9..e2f9f4f 100644 --- a/tests/HttpMessage_003.phpt +++ b/tests/HttpMessage_003.phpt @@ -3,7 +3,7 @@ HttpMessage implements Serializable, Countable --SKIPIF-- --FILE-- count()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST int(3) string(148) "HTTP/1.1 301 Location: /anywhere @@ -44,26 +44,26 @@ Content-Length: 1 X " object(HttpMessage)#%d (%d) { - ["type:protected"]=> + ["type":protected]=> int(2) - ["body:protected"]=> + ["body":protected]=> string(0) "" - ["requestMethod:protected"]=> + ["requestMethod":protected]=> string(0) "" - ["requestUrl:protected"]=> + ["requestUrl":protected]=> string(0) "" - ["responseStatus:protected"]=> + ["responseStatus":protected]=> string(2) "Ok" - ["responseCode:protected"]=> + ["responseCode":protected]=> int(200) - ["httpVersion:protected"]=> + ["httpVersion":protected]=> float(1.1) - ["headers:protected"]=> + ["headers":protected]=> array(1) { ["Server"]=> string(9) "Funky/1.0" } - ["parentMessage:protected"]=> + ["parentMessage":protected]=> NULL } int(1) diff --git a/tests/HttpMessage_004.phpt b/tests/HttpMessage_004.phpt index ab0ede9..6324233 100644 --- a/tests/HttpMessage_004.phpt +++ b/tests/HttpMessage_004.phpt @@ -30,7 +30,7 @@ var_dump($d->getBody()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(false) string(3) "Hi!" Done \ No newline at end of file diff --git a/tests/HttpMessage_005.phpt b/tests/HttpMessage_005.phpt index 6466d6e..81dd7dd 100644 --- a/tests/HttpMessage_005.phpt +++ b/tests/HttpMessage_005.phpt @@ -42,7 +42,7 @@ echo $m1->toString(true); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST GET http://example.com/ HTTP/1.0 HTTP/1.1 200 ok Server: Funky/2.0 diff --git a/tests/HttpMessage_006.phpt b/tests/HttpMessage_006.phpt index e1e236d..c7363ce 100644 --- a/tests/HttpMessage_006.phpt +++ b/tests/HttpMessage_006.phpt @@ -23,7 +23,7 @@ foreach ($m as $msg) { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST == HTTP/1.1 304 Not Modified == diff --git a/tests/HttpMessage_007.phpt b/tests/HttpMessage_007.phpt index f74e956..02d4de0 100644 --- a/tests/HttpMessage_007.phpt +++ b/tests/HttpMessage_007.phpt @@ -22,7 +22,7 @@ echo $r->toString(true); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST GET /first HTTP/1.1 HTTP/1.1 200 Ok-first GET /second HTTP/1.1 diff --git a/tests/HttpQueryString_001.phpt b/tests/HttpQueryString_001.phpt index ec64ead..413bb34 100644 --- a/tests/HttpQueryString_001.phpt +++ b/tests/HttpQueryString_001.phpt @@ -3,7 +3,7 @@ HttpQueryString global --SKIPIF-- --FILE-- --EXPECTF-- -%sTEST +%aTEST string(42) "a=b&c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3" NULL string(1) "b" @@ -72,7 +72,7 @@ object(stdClass)#%d (%d) { int(3) } object(HttpQueryString)#1 (2) { - ["queryArray:private"]=> + ["queryArray":"HttpQueryString":private]=> &array(3) { ["c"]=> string(3) "3.4" @@ -91,7 +91,7 @@ object(HttpQueryString)#1 (2) { string(1) "2" } } - ["queryString:private"]=> + ["queryString":"HttpQueryString":private]=> &string(49) "c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3&z%5B0%5D=2" } array(3) { diff --git a/tests/HttpQueryString_002.phpt b/tests/HttpQueryString_002.phpt index 9968bf6..d711f26 100644 --- a/tests/HttpQueryString_002.phpt +++ b/tests/HttpQueryString_002.phpt @@ -3,7 +3,7 @@ HttpQueryString local --SKIPIF-- --FILE-- --EXPECTF-- -%sTEST +%aTEST string(42) "a=b&c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3" NULL string(1) "b" @@ -68,7 +68,7 @@ object(stdClass)#%d (%d) { int(3) } object(HttpQueryString)#1 (2) { - ["queryArray:private"]=> + ["queryArray":"HttpQueryString":private]=> array(3) { ["c"]=> string(3) "3.4" @@ -87,7 +87,7 @@ object(HttpQueryString)#1 (2) { string(1) "2" } } - ["queryString:private"]=> + ["queryString":"HttpQueryString":private]=> string(49) "c=3.4&r%5B0%5D=1&r%5B1%5D=2&r%5B2%5D=3&z%5B0%5D=2" } array(3) { diff --git a/tests/HttpQueryString_003.phpt b/tests/HttpQueryString_003.phpt index f90a582..0287ce9 100644 --- a/tests/HttpQueryString_003.phpt +++ b/tests/HttpQueryString_003.phpt @@ -3,7 +3,7 @@ HttpQueryString xlate --SKIPIF-- --FILE-- @@ -17,7 +17,7 @@ $qs->xlate("utf8", "latin1"); var_dump($qs->get()); echo "Done\n"; --EXPECTF-- -%sTEST +%aTEST string(29) "%E4%5B0%5D=%FC&%F6%5Ba%5D=%DF" string(41) "%C3%A4%5B0%5D=%C3%BC&%C3%B6%5Ba%5D=%C3%9F" string(29) "%E4%5B0%5D=%FC&%F6%5Ba%5D=%DF" diff --git a/tests/HttpQueryString_004.phpt b/tests/HttpQueryString_004.phpt index cf70e66..cb73ea6 100644 --- a/tests/HttpQueryString_004.phpt +++ b/tests/HttpQueryString_004.phpt @@ -3,22 +3,32 @@ HttpQueryString w/ objects --SKIPIF-- --FILE-- (object) array("baz" => 1), "\0*\0prop" => "dontshow"); -$foo->bar->baz = 1; +class test_props { + public $bar; + public $baz; + protected $dont_show; + private $dont_show2; + function __construct() { + $this->bar = (object) array("baz"=>1); + $this->dont_show = 'xxx'; + $this->dont_show2 = 'zzz'; + } +} +$foo = new test_props; var_dump($q = new HttpQueryString(false, $foo)); $foo->bar->baz = 0; var_dump($q->mod($foo)); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST object(HttpQueryString)#3 (2) { - ["queryArray:private"]=> + ["queryArray":"HttpQueryString":private]=> array(1) { ["bar"]=> array(1) { @@ -26,11 +36,11 @@ object(HttpQueryString)#3 (2) { int(1) } } - ["queryString:private"]=> + ["queryString":"HttpQueryString":private]=> string(14) "bar%5Bbaz%5D=1" } object(HttpQueryString)#4 (2) { - ["queryArray:private"]=> + ["queryArray":"HttpQueryString":private]=> array(1) { ["bar"]=> array(1) { @@ -38,7 +48,7 @@ object(HttpQueryString)#4 (2) { int(0) } } - ["queryString:private"]=> + ["queryString":"HttpQueryString":private]=> string(14) "bar%5Bbaz%5D=0" } Done diff --git a/tests/HttpRequestDataShare_001.phpt b/tests/HttpRequestDataShare_001.phpt index cdbdc36..728fe0d 100644 --- a/tests/HttpRequestDataShare_001.phpt +++ b/tests/HttpRequestDataShare_001.phpt @@ -33,6 +33,6 @@ var_dump(current($r1->getResponseCookies())->cookies["PREF"] === HttpUtil::parse echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) Done diff --git a/tests/HttpRequestDataShare_002.phpt b/tests/HttpRequestDataShare_002.phpt index 4c61a79..9bd2a18 100644 --- a/tests/HttpRequestDataShare_002.phpt +++ b/tests/HttpRequestDataShare_002.phpt @@ -38,7 +38,7 @@ if (current($r1->getResponseCookies())->cookies["PREF"] !== HttpUtil::parseCooki echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST object(HttpRequestDataShare)#1 (4) { ["cookie"]=> bool(true) diff --git a/tests/HttpRequestPool_001.phpt b/tests/HttpRequestPool_001.phpt index 4008e50..f94e92f 100644 --- a/tests/HttpRequestPool_001.phpt +++ b/tests/HttpRequestPool_001.phpt @@ -3,7 +3,7 @@ HttpRequestPool --SKIPIF-- --EXPECTF-- -%sTEST +%aTEST http://www.php.net/=200:200 http://dev.iworks.at/ext-http/.print_request.php=200:200 . diff --git a/tests/HttpRequestPool_003.phpt b/tests/HttpRequestPool_003.phpt index 91871c6..b08a706 100644 --- a/tests/HttpRequestPool_003.phpt +++ b/tests/HttpRequestPool_003.phpt @@ -121,7 +121,7 @@ printf("Elapsed: %0.3fs\n", microtime(true)-$time); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST %d %s %d %d %s %d %d %s %d diff --git a/tests/HttpRequestPool_004.phpt b/tests/HttpRequestPool_004.phpt index baafe8a..8348ec1 100644 --- a/tests/HttpRequestPool_004.phpt +++ b/tests/HttpRequestPool_004.phpt @@ -3,7 +3,7 @@ HttpRequestPool::__destruct() invalid curl handle --SKIPIF-- @@ -15,5 +15,5 @@ $p = null; echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Done diff --git a/tests/HttpRequestPool_005.phpt b/tests/HttpRequestPool_005.phpt index b08729e..ac16995 100644 --- a/tests/HttpRequestPool_005.phpt +++ b/tests/HttpRequestPool_005.phpt @@ -3,7 +3,7 @@ HttpRequestPool exception --SKIPIF-- --FILE-- @@ -31,7 +31,7 @@ try { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST HttpRequestPoolException: Exception caused by 2 inner exception(s) HttpInvalidParamException: Empty or too short HTTP message: '' HttpRequestException: %souldn't resolve host name; %s (http://_____/) diff --git a/tests/HttpRequestPool_006.phpt b/tests/HttpRequestPool_006.phpt index 1b5cb9f..043c208 100644 --- a/tests/HttpRequestPool_006.phpt +++ b/tests/HttpRequestPool_006.phpt @@ -32,18 +32,18 @@ var_dump($p->getAttachedRequests()); echo "Done\n"; ?> --EXPECTF-- -%sTEST -exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %sHttpRequestPool_006.php:%d +%aTEST +exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d Stack trace: -#0 %sHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r)) +#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r)) #1 [internal function]: r->onProgress(Array) -#2 %sHttpRequestPool_006.php(%d): HttpRequestPool->send() +#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send() #3 {main} -exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %sHttpRequestPool_006.php:%d +exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d Stack trace: -#0 %sHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r)) +#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r)) #1 [internal function]: r->onProgress(Array) -#2 %sHttpRequestPool_006.php(%d): HttpRequestPool->send() +#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send() #3 {main} array(0) { } diff --git a/tests/HttpRequestPool_007.phpt b/tests/HttpRequestPool_007.phpt index 8e97d40..29a2505 100644 --- a/tests/HttpRequestPool_007.phpt +++ b/tests/HttpRequestPool_007.phpt @@ -28,7 +28,7 @@ class Request extends HttpRequest $c = $this->getResponseCode(); $b = $this->getResponseBody(); - printf("%d %s %d\n", $c, $u, strlen($b)); + printf("%d %a %d\n", $c, $u, strlen($b)); if ($c == 200 && $this->pool->dir) { file_put_contents($this->pool->all[$u], $b); @@ -112,55 +112,55 @@ printf("Elapsed: %0.3fs\n", microtime(true)-$time); echo "Done\n"; ?> --EXPECTF-- -%sTEST -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d -%d %s %d +%aTEST +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d +%d %a %d Elapsed: %fs Done diff --git a/tests/HttpRequest_001.phpt b/tests/HttpRequest_001.phpt index abe6506..ddb0a43 100644 --- a/tests/HttpRequest_001.phpt +++ b/tests/HttpRequest_001.phpt @@ -3,7 +3,7 @@ HttpRequest options --SKIPIF-- --FILE-- @@ -22,7 +22,7 @@ $r1 = null; $r2 = null; ?> --EXPECTF-- -%sTEST +%aTEST Array ( [0] => Array diff --git a/tests/HttpRequest_002.phpt b/tests/HttpRequest_002.phpt index 5710d59..6ad0ced 100644 --- a/tests/HttpRequest_002.phpt +++ b/tests/HttpRequest_002.phpt @@ -3,7 +3,7 @@ HttpRequest GET/POST --SKIPIF-- getResponseMessage()->getResponseCode()); echo "Done"; ?> --EXPECTF-- -%sTEST +%aTEST Array ( [effective_url] => http://www.google.com/ @@ -56,9 +56,9 @@ Array [proxyauth_avail] => %d [os_errno] => %d [num_connects] => %d - [ssl_engines] => Array%s + [ssl_engines] => Array%a - [cookies] => Array%s + [cookies] => Array%a [error] => ) @@ -76,7 +76,7 @@ Array ( [name] => data.txt [type] => text/plain - [tmp_name] => %s + [tmp_name] => %a [error] => 0 [size] => 1010 ) diff --git a/tests/HttpRequest_003.phpt b/tests/HttpRequest_003.phpt index 3ce4fcb..879b42b 100644 --- a/tests/HttpRequest_003.phpt +++ b/tests/HttpRequest_003.phpt @@ -3,7 +3,7 @@ HttpRequest SSL --SKIPIF-- @@ -24,7 +24,7 @@ $r->send(); var_dump($o); ?> --EXPECTF-- -%sTEST +%aTEST string(10) "1234567890" bool(true) bool(true) diff --git a/tests/HttpRequest_004.phpt b/tests/HttpRequest_004.phpt index 948a07e..313a4dc 100644 --- a/tests/HttpRequest_004.phpt +++ b/tests/HttpRequest_004.phpt @@ -39,7 +39,7 @@ var_dump($fields); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST First Request string(%d) "Array diff --git a/tests/HttpRequest_005.phpt b/tests/HttpRequest_005.phpt index 8f9b7e4..0e78984 100644 --- a/tests/HttpRequest_005.phpt +++ b/tests/HttpRequest_005.phpt @@ -20,5 +20,5 @@ foreach (get_class_methods('HttpRequest') as $method) { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Done diff --git a/tests/HttpRequest_006.phpt b/tests/HttpRequest_006.phpt index 24ee8a1..114d0b0 100644 --- a/tests/HttpRequest_006.phpt +++ b/tests/HttpRequest_006.phpt @@ -20,7 +20,7 @@ var_dump($r->send()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST object(HttpMessage)#%d (%d) { ["type:protected"]=> int(2) @@ -57,7 +57,7 @@ object(HttpMessage)#%d (%d) { float(1.1) ["headers:protected"]=> array(6) { - %s + %a } ["parentMessage:protected"]=> NULL @@ -98,7 +98,7 @@ object(HttpMessage)#%d (%d) { float(1.1) ["headers:protected"]=> array(6) { - %s + %a } ["parentMessage:protected"]=> NULL @@ -139,7 +139,7 @@ object(HttpMessage)#%d (%d) { float(1.1) ["headers:protected"]=> array(6) { - %s + %a } ["parentMessage:protected"]=> NULL diff --git a/tests/HttpRequest_007.phpt b/tests/HttpRequest_007.phpt index f440c83..067e36c 100644 --- a/tests/HttpRequest_007.phpt +++ b/tests/HttpRequest_007.phpt @@ -18,9 +18,9 @@ var_dump($r->getHistory()->toString(true)); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST string(%d) "PUT /ext-http/.print_put.php5 HTTP/1.1 -User-Agent: PECL::HTTP/%s +User-Agent: PECL::HTTP/%a Host: dev.iworks.at Accept: */* Content-Type: text/plain @@ -41,9 +41,9 @@ echo "Done\n"; HTTP/1.1 100 Continue HTTP/1.1 200 OK -Date: %s -Server: %s -X-Powered-By: %s +Date: %a +Server: %a +X-Powered-By: %a Vary: Accept-Encoding Content-Length: %d Content-Type: text/html diff --git a/tests/HttpRequest_008.phpt b/tests/HttpRequest_008.phpt index 638d4c8..81dbcb3 100644 --- a/tests/HttpRequest_008.phpt +++ b/tests/HttpRequest_008.phpt @@ -19,10 +19,10 @@ var_dump($r->getRawRequestMessage()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST int(200) string(%d) "FOOBAR /ext-http/.print_request.php HTTP/1.1 -User-Agent: %s +User-Agent: %a Host: dev.iworks.at Accept: */* Content-Type: text/plain diff --git a/tests/HttpRequest_009.phpt b/tests/HttpRequest_009.phpt index e74121a..bbc2ddf 100644 --- a/tests/HttpRequest_009.phpt +++ b/tests/HttpRequest_009.phpt @@ -29,7 +29,7 @@ $r->send(); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Array ( [dltotal] => %f @@ -37,7 +37,7 @@ Array [ultotal] => %f [ulnow] => %f ) -%srray +%array ( [dltotal] => %f [dlnow] => %f diff --git a/tests/HttpRequest_010.phpt b/tests/HttpRequest_010.phpt index 10ec767..292cc1f 100644 --- a/tests/HttpRequest_010.phpt +++ b/tests/HttpRequest_010.phpt @@ -3,7 +3,7 @@ HttpRequest cookie API --SKIPIF-- --FILE-- @@ -42,7 +42,7 @@ if ($c[2] !== $c[3]) { echo "Done\n"; --EXPECTF-- -%sTEST +%aTEST bool(true) bool(true) Done diff --git a/tests/HttpResponse_001.phpt b/tests/HttpResponse_001.phpt index 21db458..8d2417d 100644 --- a/tests/HttpResponse_001.phpt +++ b/tests/HttpResponse_001.phpt @@ -3,7 +3,7 @@ HttpResponse - send data with caching headers --SKIPIF-- --FILE-- @@ -14,10 +14,10 @@ HttpResponse::setData('foobar'); HttpResponse::send(); ?> --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: public, must-revalidate, max-age=3600 -Last-Modified: %s, %d %s 20%d %d:%d:%d GMT -Content-Type: %s +Last-Modified: %a, %d %a 20%d %d:%d:%d GMT +Content-Type: %a Accept-Ranges: bytes ETag: "3858f62230ac3c915f300c664312c63f" Content-Length: 6 diff --git a/tests/HttpResponse_002.phpt b/tests/HttpResponse_002.phpt index 49ad6fa..584f4a7 100644 --- a/tests/HttpResponse_002.phpt +++ b/tests/HttpResponse_002.phpt @@ -3,7 +3,7 @@ HttpResponse - send gzipped file --SKIPIF-- @@ -16,10 +16,10 @@ HttpResponse::setFile(__FILE__); HttpResponse::send(); ?> --EXPECTF-- -X-Powered-By: PHP/%s -Content-Type: %s +X-Powered-By: PHP/%a +Content-Type: %a Accept-Ranges: bytes Content-Encoding: gzip Vary: Accept-Encoding -%s +%a diff --git a/tests/HttpResponse_003.phpt b/tests/HttpResponse_003.phpt index 22f4674..8a45f47 100644 --- a/tests/HttpResponse_003.phpt +++ b/tests/HttpResponse_003.phpt @@ -3,7 +3,7 @@ HttpResponse - send gzipped file with caching headers --SKIPIF-- @@ -18,13 +18,13 @@ HttpResponse::setFile(__FILE__); HttpResponse::send(); ?> --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: public, must-revalidate, max-age=3600 -Last-Modified: %s, %d %s 20%d %d:%d:%d GMT -Content-Type: %s +Last-Modified: %a, %d %a 20%d %d:%d:%d GMT +Content-Type: %a Accept-Ranges: bytes -ETag: "%s" +ETag: "%a" Content-Encoding: gzip Vary: Accept-Encoding -%s +%a diff --git a/tests/HttpResponse_004.phpt b/tests/HttpResponse_004.phpt index ffe26c9..d8d02f9 100644 --- a/tests/HttpResponse_004.phpt +++ b/tests/HttpResponse_004.phpt @@ -4,7 +4,7 @@ HttpResponse - send cached gzipped data --ENV-- @@ -19,7 +19,7 @@ HttpResponse::setData("abc"); HttpResponse::send(); ?> --EXPECTF-- -Status: 304 +Status: 304%s X-Powered-By: PHP/%s Cache-Control: public, must-revalidate, max-age=3600 Last-Modified: %s diff --git a/tests/HttpResponse_005.phpt b/tests/HttpResponse_005.phpt index c43e7f8..afa768c 100644 --- a/tests/HttpResponse_005.phpt +++ b/tests/HttpResponse_005.phpt @@ -4,7 +4,7 @@ HttpResponse file not found --FILE-- --EXPECTF-- -Status: 404 +Status: 404%s X-Powered-By: PHP/%s Content-Type: text/plain diff --git a/tests/allowed_methods_002.phpt b/tests/allowed_methods_002.phpt index 800a805..99d0c61 100644 --- a/tests/allowed_methods_002.phpt +++ b/tests/allowed_methods_002.phpt @@ -4,7 +4,7 @@ allowed methods --FILE-- --EXPECTF-- -Status: 405 -X-Powered-By: PHP/%s +Status: 405%s +X-Powered-By: PHP/%a Allow: POST -Content-type: %s +Content-type: %a diff --git a/tests/allowed_methods_002_logging.phpt b/tests/allowed_methods_002_logging.phpt index 73b458b..6edbb6c 100644 --- a/tests/allowed_methods_002_logging.phpt +++ b/tests/allowed_methods_002_logging.phpt @@ -4,7 +4,7 @@ logging allowed methods --ENV-- HTTP_HOST=example.com @@ -16,6 +16,6 @@ log_content(_AMETH_LOG); echo "Done"; ?> --EXPECTF-- -%sTEST -%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [405-ALLOWED] Allow: POST <%s> +%aTEST +%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [405-ALLOWED] Allow: POST <%a> Done diff --git a/tests/build_str_001.phpt b/tests/build_str_001.phpt index 8aeafcc..8e2ce39 100644 --- a/tests/build_str_001.phpt +++ b/tests/build_str_001.phpt @@ -22,7 +22,7 @@ echo http_build_str(array(1,2,array(3)), "foo", "&"), "\n"; echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST a=b a=b&c%5B0%5D=1 a=b&c%5B0%5D=1&d%5Be%5D=f diff --git a/tests/build_url_001.phpt b/tests/build_url_001.phpt index d131f55..c8b5ad3 100644 --- a/tests/build_url_001.phpt +++ b/tests/build_url_001.phpt @@ -12,7 +12,7 @@ echo http_build_url('with/some/path/'), "\n"; echo "Done\n"; ?> --EXPECTF-- -%sTEST -http://%s/page -http://%s/with/some/path/ +%aTEST +http://%a/page +http://%a/with/some/path/ Done diff --git a/tests/build_url_002.phpt b/tests/build_url_002.phpt index dbaa937..787b7f4 100644 --- a/tests/build_url_002.phpt +++ b/tests/build_url_002.phpt @@ -15,7 +15,7 @@ print_r($u); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST https://www.example.com:9999/replaced?q=1#n https://www.example.com:9999/replaced?q=1#n Array diff --git a/tests/build_url_003.phpt b/tests/build_url_003.phpt index cb2d84f..1e55290 100644 --- a/tests/build_url_003.phpt +++ b/tests/build_url_003.phpt @@ -3,7 +3,7 @@ http_build_url() --SKIPIF-- --ENV-- HTTP_HOST=www.example.com @@ -18,7 +18,7 @@ printf("-%s-\n", http_build_url($url, array('scheme' => 'ftp', 'host' => 'ftp.ex echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST -http://www.example.com/path/?query#anchor- -https://www.example.com/path/?query#anchor- -https://ssl.example.com/path/?query#anchor- diff --git a/tests/build_url_004.phpt b/tests/build_url_004.phpt index 10ce955..f518f7b 100644 --- a/tests/build_url_004.phpt +++ b/tests/build_url_004.phpt @@ -14,7 +14,7 @@ echo http_build_url("http://www.example.com:8080/foo?a[0]=b#frag", "?a[0]=1&b=c& echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST http://www.example.com/foo/baz http://www.example.com/foo/baz http://mike@www.example.com/foo/baz diff --git a/tests/chunked_decode_001.phpt b/tests/chunked_decode_001.phpt index 2575704..3d65dbf 100644 --- a/tests/chunked_decode_001.phpt +++ b/tests/chunked_decode_001.phpt @@ -19,7 +19,7 @@ $data = var_dump(http_chunked_decode($data)); ?> --EXPECTF-- -%sTEST +%aTEST string(12) "abra cadabra" diff --git a/tests/chunked_decode_002.phpt b/tests/chunked_decode_002.phpt index 8221ee8..3444932 100644 --- a/tests/chunked_decode_002.phpt +++ b/tests/chunked_decode_002.phpt @@ -19,7 +19,7 @@ $data = var_dump(http_chunked_decode($data)); ?> --EXPECTF-- -%sTEST +%aTEST string(12) "abra cadabra" diff --git a/tests/chunked_decode_003.phpt b/tests/chunked_decode_003.phpt index 0081bbe..c9da8c2 100644 --- a/tests/chunked_decode_003.phpt +++ b/tests/chunked_decode_003.phpt @@ -19,8 +19,8 @@ $data = var_dump(http_chunked_decode($data)); ?> --EXPECTF-- -%sTEST -%sWarning%shttp_chunked_decode()%sTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%s +%aTEST +%aWarning%ahttp_chunked_decode()%aTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%a string(24) "abra cadabra all we got diff --git a/tests/chunked_decode_004.phpt b/tests/chunked_decode_004.phpt index 77aed28..5dc7157 100644 --- a/tests/chunked_decode_004.phpt +++ b/tests/chunked_decode_004.phpt @@ -19,7 +19,7 @@ $data = var_dump(http_chunked_decode($data)); ?> --EXPECTF-- -%sTEST +%aTEST string(24) "abra cadabra all we got diff --git a/tests/cloning_001.phpt b/tests/cloning_001.phpt index 7b40fdc..20c8fe6 100644 --- a/tests/cloning_001.phpt +++ b/tests/cloning_001.phpt @@ -3,7 +3,7 @@ cloning --SKIPIF-- --FILE-- @@ -22,7 +22,7 @@ var_dump($r1->getResponseInfo() == $r2->getResponseInfo()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(false) bool(false) bool(false) diff --git a/tests/date_001.phpt b/tests/date_001.phpt index 7964be7..95d0268 100644 --- a/tests/date_001.phpt +++ b/tests/date_001.phpt @@ -11,7 +11,7 @@ echo http_date(1), "\n"; echo http_date(1234567890), "\n"; ?> --EXPECTF-- -%sTEST +%aTEST Thu, 01 Jan 1970 00:00:01 GMT Fri, 13 Feb 2009 23:31:30 GMT diff --git a/tests/date_002.phpt b/tests/date_002.phpt index 1623595..aeb1205 100644 --- a/tests/date_002.phpt +++ b/tests/date_002.phpt @@ -14,8 +14,8 @@ var_dump($t > 1); echo "$t\n$d\nDone\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) %d -%s, %d %s %d %d:%d:%d GMT +%a, %d %a %d %d:%d:%d GMT Done diff --git a/tests/encoding_objects_001.phpt b/tests/encoding_objects_001.phpt index 67da0ce..60fe4cd 100644 --- a/tests/encoding_objects_001.phpt +++ b/tests/encoding_objects_001.phpt @@ -27,7 +27,7 @@ var_dump($id == $pd); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Hi there! Yo... bool(true) diff --git a/tests/encodings.phpt b/tests/encodings.phpt index f8676d5..e55c6b9 100644 --- a/tests/encodings.phpt +++ b/tests/encodings.phpt @@ -37,7 +37,7 @@ if (extension_loaded('zlib')) { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) bool(true) bool(true) diff --git a/tests/etag_mode_031.phpt b/tests/etag_mode_031.phpt index 813b309..43a0c1a 100644 --- a/tests/etag_mode_031.phpt +++ b/tests/etag_mode_031.phpt @@ -4,7 +4,7 @@ crc32 etag (may fail because PHPs crc32 is actually crc32b) --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 Accept-Ranges: bytes ETag: "4e818847" Content-Length: 4 -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_032.phpt b/tests/etag_mode_032.phpt index 8757118..2f2c643 100644 --- a/tests/etag_mode_032.phpt +++ b/tests/etag_mode_032.phpt @@ -4,7 +4,7 @@ sha1 etag --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 Accept-Ranges: bytes ETag: "03cfd743661f07975fa2f1220c5194cbaff48451" Content-Length: 4 -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_033.phpt b/tests/etag_mode_033.phpt index 3f75c16..4842a83 100644 --- a/tests/etag_mode_033.phpt +++ b/tests/etag_mode_033.phpt @@ -4,7 +4,7 @@ md5 etag --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 Accept-Ranges: bytes ETag: "0bee89b07a248e27c83fc3d5951213c1" Content-Length: 4 -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_034.phpt b/tests/etag_mode_034.phpt index bce9e52..6416a48 100644 --- a/tests/etag_mode_034.phpt +++ b/tests/etag_mode_034.phpt @@ -4,7 +4,7 @@ ext/hash etag --FILE-- @@ -14,11 +14,11 @@ http_cache_etag(); http_send_data("abc\n"); ?> --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 Accept-Ranges: bytes ETag: "edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb" Content-Length: 4 -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_041.phpt b/tests/etag_mode_041.phpt index 694608e..e1f8a5f 100644 --- a/tests/etag_mode_041.phpt +++ b/tests/etag_mode_041.phpt @@ -4,7 +4,7 @@ ob crc32 etag (may fail because PHPs crc32 is actually crc32b) --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 ETag: "4e818847" -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_042.phpt b/tests/etag_mode_042.phpt index 59d7f42..843e636 100644 --- a/tests/etag_mode_042.phpt +++ b/tests/etag_mode_042.phpt @@ -4,7 +4,7 @@ ob sha1 etag --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 ETag: "03cfd743661f07975fa2f1220c5194cbaff48451" -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_043.phpt b/tests/etag_mode_043.phpt index 065bc93..303312b 100644 --- a/tests/etag_mode_043.phpt +++ b/tests/etag_mode_043.phpt @@ -4,7 +4,7 @@ ob md5 etag --FILE-- --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 ETag: "0bee89b07a248e27c83fc3d5951213c1" -Content-type: %s +Content-type: %a abc diff --git a/tests/etag_mode_044.phpt b/tests/etag_mode_044.phpt index 0d8129a..faf4bf1 100644 --- a/tests/etag_mode_044.phpt +++ b/tests/etag_mode_044.phpt @@ -4,7 +4,7 @@ ob ext/hash etag --FILE-- @@ -14,9 +14,9 @@ http_cache_etag(); print("abc\n"); ?> --EXPECTF-- -X-Powered-By: PHP/%s +X-Powered-By: PHP/%a Cache-Control: private, must-revalidate, max-age=0 ETag: "edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb" -Content-type: %s +Content-type: %a abc diff --git a/tests/exceptions.phpt b/tests/exceptions.phpt index 1febe33..c99461f 100644 --- a/tests/exceptions.phpt +++ b/tests/exceptions.phpt @@ -3,7 +3,7 @@ exceptions --SKIPIF-- --FILE-- $c) { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST 1: HttpRuntimeException 2: HttpInvalidParamException 3: HttpHeaderException diff --git a/tests/get_request_data_001.phpt b/tests/get_request_data_001.phpt index 3dabaa1..ea79b26 100644 --- a/tests/get_request_data_001.phpt +++ b/tests/get_request_data_001.phpt @@ -25,7 +25,7 @@ var_dump(fread(http_get_request_body_stream(), 4096)); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST Array ( [Accept-Charset] => iso-8859-1, * diff --git a/tests/match_request_header_001.phpt b/tests/match_request_header_001.phpt index b832f34..7c1c2b7 100644 --- a/tests/match_request_header_001.phpt +++ b/tests/match_request_header_001.phpt @@ -3,7 +3,7 @@ http_match_request_header() --SKIPIF-- --ENV-- HTTP_FOO=bar @@ -16,7 +16,7 @@ var_dump(http_match_request_header("foo", "BAR", 1)); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) bool(true) bool(false) diff --git a/tests/negotiation_001.phpt b/tests/negotiation_001.phpt index 89a8e49..9cf9936 100644 --- a/tests/negotiation_001.phpt +++ b/tests/negotiation_001.phpt @@ -3,7 +3,7 @@ negotiation --SKIPIF-- --ENV-- HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8 @@ -36,7 +36,7 @@ print_r($tresult); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST string(2) "de" string(2) "de" string(10) "iso-8859-1" diff --git a/tests/ob_deflatehandler_001.phpt b/tests/ob_deflatehandler_001.phpt index 2d7a059..bd41dcd 100644 --- a/tests/ob_deflatehandler_001.phpt +++ b/tests/ob_deflatehandler_001.phpt @@ -4,7 +4,7 @@ ob_deflatehandler --ENV-- @@ -16,8 +16,8 @@ echo "-TEST\n"; echo "Done\n"; ?> --EXPECTF-- -%s +%a Content-Encoding: gzip Vary: Accept-Encoding -%s +%a diff --git a/tests/ob_inflatehandler_001.phpt b/tests/ob_inflatehandler_001.phpt index 2e494de..5d352b4 100644 --- a/tests/ob_inflatehandler_001.phpt +++ b/tests/ob_inflatehandler_001.phpt @@ -12,5 +12,5 @@ ob_start('ob_inflatehandler'); echo http_deflate("TEST\n"); ?> --EXPECTF-- -%sTEST +%aTEST diff --git a/tests/parse_cookie_001.phpt b/tests/parse_cookie_001.phpt index a3dbe60..2668b0e 100644 --- a/tests/parse_cookie_001.phpt +++ b/tests/parse_cookie_001.phpt @@ -13,8 +13,8 @@ var_dump(http_parse_cookie('name="value"; foo="bar\"baz"; hey=got"it ; path=/ echo "Done\n"; ?> --EXPECTF-- -%sTEST -object(stdClass)%s { +%aTEST +object(stdClass)%a { ["cookies"]=> array(3) { ["name"]=> diff --git a/tests/parse_cookie_002.phpt b/tests/parse_cookie_002.phpt index f40c823..b417922 100644 --- a/tests/parse_cookie_002.phpt +++ b/tests/parse_cookie_002.phpt @@ -3,7 +3,7 @@ parse cookie --SKIPIF-- --FILE-- cookies['foo']); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST string(0) "" string(0) "" string(0) "" diff --git a/tests/parse_headers_001.phpt b/tests/parse_headers_001.phpt index 9da8c81..c81e883 100644 --- a/tests/parse_headers_001.phpt +++ b/tests/parse_headers_001.phpt @@ -21,7 +21,7 @@ print_r(http_parse_headers( )); ?> --EXPECTF-- -%sTEST +%aTEST Array ( [Host] => Array diff --git a/tests/parse_message_001.phpt b/tests/parse_message_001.phpt index 84c874c..a252d63 100644 --- a/tests/parse_message_001.phpt +++ b/tests/parse_message_001.phpt @@ -13,6 +13,6 @@ $m = http_parse_message(http_get('http://www.google.com')); echo $m->body; echo "Done\n"; --EXPECTF-- -%sTEST -%sThe document has moved%s +%aTEST +%aThe document has moved%a Done diff --git a/tests/parse_message_002.phpt b/tests/parse_message_002.phpt index 281215d..95a2815 100644 --- a/tests/parse_message_002.phpt +++ b/tests/parse_message_002.phpt @@ -19,7 +19,7 @@ print_r(http_parse_message($message)); echo "Done\n"; --EXPECTF-- -%sTEST +%aTEST stdClass Object ( [type] => 2 diff --git a/tests/parse_message_003.phpt b/tests/parse_message_003.phpt index 9ef5b21..3ceafe9 100644 --- a/tests/parse_message_003.phpt +++ b/tests/parse_message_003.phpt @@ -25,7 +25,7 @@ $msg = http_parse_message($message); echo "Done\n"; --EXPECTF-- -%sTEST +%aTEST string(2) "OK" -%s Invalid Content-Range header: bytes 0-1/1 in%s +%a Invalid Content-Range header: bytes 0-1/1 in%a Done diff --git a/tests/parse_message_004.phpt b/tests/parse_message_004.phpt index 759065c..5ce6048 100644 --- a/tests/parse_message_004.phpt +++ b/tests/parse_message_004.phpt @@ -30,8 +30,8 @@ var_dump(http_parse_message($message)); echo "Done\n"; ?> --EXPECTF-- -%sTEST -object(stdClass)%s { +%aTEST +object(stdClass)%a { ["type"]=> int(2) ["httpVersion"]=> @@ -50,7 +50,7 @@ object(stdClass)%s { ["body"]=> string(10) "1234567890" ["parentMessage"]=> - object(stdClass)%s { + object(stdClass)%a { ["type"]=> int(1) ["httpVersion"]=> @@ -69,7 +69,7 @@ object(stdClass)%s { ["body"]=> string(0) "" ["parentMessage"]=> - object(stdClass)%s { + object(stdClass)%a { ["type"]=> int(2) ["httpVersion"]=> @@ -88,7 +88,7 @@ object(stdClass)%s { ["body"]=> string(0) "" ["parentMessage"]=> - object(stdClass)%s { + object(stdClass)%a { ["type"]=> int(1) ["httpVersion"]=> diff --git a/tests/parse_message_005.phpt b/tests/parse_message_005.phpt index f86aac7..e07db87 100644 --- a/tests/parse_message_005.phpt +++ b/tests/parse_message_005.phpt @@ -26,7 +26,7 @@ Content-Range: bytes 0-0/100 echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST stdClass Object ( [type] => 2 diff --git a/tests/parse_params_001.phpt b/tests/parse_params_001.phpt index bbfa63b..ab5a5b2 100644 --- a/tests/parse_params_001.phpt +++ b/tests/parse_params_001.phpt @@ -16,8 +16,8 @@ $p = http_parse_params('a=b'); var_dump($p->params[0]); echo "Done\n"; ?> --EXPECTF-- -%sTEST -object(stdClass)%s { +%aTEST +object(stdClass)%a { ["params"]=> array(2) { [0]=> @@ -29,7 +29,7 @@ object(stdClass)%s { } } } -object(stdClass)%s { +object(stdClass)%a { ["params"]=> array(2) { [0]=> @@ -41,7 +41,7 @@ object(stdClass)%s { } } } -object(stdClass)%s { +object(stdClass)%a { ["params"]=> array(2) { [0]=> @@ -53,7 +53,7 @@ object(stdClass)%s { } } } -object(stdClass)%s { +object(stdClass)%a { ["params"]=> array(3) { [0]=> diff --git a/tests/persistent_handles_001.phpt b/tests/persistent_handles_001.phpt index 8bdba25..05d63b5 100644 --- a/tests/persistent_handles_001.phpt +++ b/tests/persistent_handles_001.phpt @@ -17,7 +17,7 @@ echo "No free handles!\n"; foreach (http_persistent_handles_count() as $provider => $idents) { foreach ((array)$idents as $ident => $counts) { if (!empty($counts["free"])) { - printf("%s, %s, %s\n", $provider, $ident, $counts["free"]); + printf("%a, %a, %a\n", $provider, $ident, $counts["free"]); } } } @@ -38,7 +38,7 @@ print_r(http_persistent_handles_count()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST No free handles! One free request handle within GLOBAL: int(1) Reusing request handle: bool(true) diff --git a/tests/persistent_handles_002.phpt b/tests/persistent_handles_002.phpt index fb4c8fa..afaad11 100644 --- a/tests/persistent_handles_002.phpt +++ b/tests/persistent_handles_002.phpt @@ -3,7 +3,7 @@ persistent handles --SKIPIF-- @@ -18,7 +18,7 @@ echo "No free handles!\n"; foreach (http_persistent_handles_count() as $provider => $idents) { foreach ((array)$idents as $ident => $counts) { if (!empty($counts["free"])) { - printf("%s, %s, %s\n", $provider, $ident, $counts["free"]); + printf("%a, %a, %a\n", $provider, $ident, $counts["free"]); } } } @@ -40,7 +40,7 @@ print_r(http_persistent_handles_count()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST No free handles! One free request handle within GLOBAL: int(1) Reusing request handle: bool(true) diff --git a/tests/persistent_handles_003.phpt b/tests/persistent_handles_003.phpt index 3015835..f676f56 100644 --- a/tests/persistent_handles_003.phpt +++ b/tests/persistent_handles_003.phpt @@ -17,7 +17,7 @@ echo "No free handles!\n"; foreach (http_persistent_handles_count() as $provider => $idents) { foreach ((array)$idents as $ident => $counts) { if (!empty($counts["free"])) { - printf("%s, %s, %s\n", $provider, $ident, $counts["free"]); + printf("%a, %a, %a\n", $provider, $ident, $counts["free"]); } } } @@ -39,7 +39,7 @@ print_r(http_persistent_handles_count()); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST No free handles! One free request handle within GLOBAL: int(1) Reusing request handle: bool(true) diff --git a/tests/redirect_011.phpt b/tests/redirect_011.phpt index fc3f3d2..e30fed0 100644 --- a/tests/redirect_011.phpt +++ b/tests/redirect_011.phpt @@ -4,7 +4,7 @@ http_redirect() with params --ENV-- HTTP_HOST=localhost @@ -15,10 +15,10 @@ log_prepare(_REDIR_LOG); http_redirect('redirect', array('a' => 1, 'b' => 2)); ?> --EXPECTF-- -Status: 302 -X-Powered-By: PHP/%s +Status: 302%s +X-Powered-By: PHP/%a Location: http://localhost/redirect?a=1&b=2 -Content-type: %s +Content-type: %a Redirecting to http://localhost/redirect?a=1&b=2. diff --git a/tests/redirect_011_logging.phpt b/tests/redirect_011_logging.phpt index 237c043..22eada5 100644 --- a/tests/redirect_011_logging.phpt +++ b/tests/redirect_011_logging.phpt @@ -4,7 +4,7 @@ logging redirects --ENV-- HTTP_HOST=example.com @@ -16,6 +16,6 @@ log_content(_REDIR_LOG); echo "Done"; ?> --EXPECTF-- -%sTEST -%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%s <%s> +%aTEST +%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%a <%a> Done diff --git a/tests/redirect_012.phpt b/tests/redirect_012.phpt index 1d48ae5..620b679 100644 --- a/tests/redirect_012.phpt +++ b/tests/redirect_012.phpt @@ -4,7 +4,7 @@ http_redirect() with session --ENV-- @@ -17,11 +17,11 @@ session_start(); http_redirect('redirect', array('a' => 1), true); ?> --EXPECTF-- -Status: 302 -X-Powered-By: PHP/%s -Set-Cookie: PHPSESSID=%s; path=/ -Expires: %s -Cache-Control: %s -Pragma: %s -Location: http://localhost/redirect?a=1&PHPSESSID=%s -Content-type: %s +Status: 302%s +X-Powered-By: PHP/%a +Set-Cookie: PHPSESSID=%a; path=/ +Expires: %a +Cache-Control: %a +Pragma: %a +Location: http://localhost/redirect?a=1&PHPSESSID=%a +Content-type: %a diff --git a/tests/redirect_012_logging.phpt b/tests/redirect_012_logging.phpt index 237c043..22eada5 100644 --- a/tests/redirect_012_logging.phpt +++ b/tests/redirect_012_logging.phpt @@ -4,7 +4,7 @@ logging redirects --ENV-- HTTP_HOST=example.com @@ -16,6 +16,6 @@ log_content(_REDIR_LOG); echo "Done"; ?> --EXPECTF-- -%sTEST -%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%s <%s> +%aTEST +%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [302-REDIRECT] Location: http%a <%a> Done diff --git a/tests/redirect_013.phpt b/tests/redirect_013.phpt index 8ef8a6b..f8bec17 100644 --- a/tests/redirect_013.phpt +++ b/tests/redirect_013.phpt @@ -4,7 +4,7 @@ http_redirect() permanent --ENV-- HTTP_HOST=localhost @@ -15,10 +15,10 @@ log_prepare(_REDIR_LOG); http_redirect('redirect', null, false, HTTP_REDIRECT_PERM); ?> --EXPECTF-- -Status: 301 -X-Powered-By: PHP/%s +Status: 301%s +X-Powered-By: PHP/%a Location: http://localhost/redirect -Content-type: %s +Content-type: %a Redirecting to http://localhost/redirect. diff --git a/tests/redirect_013_logging.phpt b/tests/redirect_013_logging.phpt index 0a98118..c8f77ac 100644 --- a/tests/redirect_013_logging.phpt +++ b/tests/redirect_013_logging.phpt @@ -4,7 +4,7 @@ logging redirects --ENV-- HTTP_HOST=example.com @@ -16,6 +16,6 @@ log_content(_REDIR_LOG); echo "Done"; ?> --EXPECTF-- -%sTEST -%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [301-REDIRECT] Location: http%s <%s> +%aTEST +%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d [301-REDIRECT] Location: http%a <%a> Done diff --git a/tests/request_cookies.phpt b/tests/request_cookies.phpt index 8488b9d..f83f46a 100644 --- a/tests/request_cookies.phpt +++ b/tests/request_cookies.phpt @@ -22,14 +22,14 @@ echo $r->getHistory()->toString(true); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST GET /ext-http/.print_request.php HTTP/1.1 -User-Agent: %s +User-Agent: %a Host: dev.iworks.at Accept: */* Cookie: name=val%3Due HTTP/1.1 200 OK -%s +%a Array ( @@ -37,12 +37,12 @@ Array ) GET /ext-http/.print_request.php HTTP/1.1 -User-Agent: %s +User-Agent: %a Host: dev.iworks.at Accept: */* Cookie: name=val=ue; HTTP/1.1 200 OK -%s +%a Array ( diff --git a/tests/request_etag.phpt b/tests/request_etag.phpt index 69b26d2..9201b4b 100644 --- a/tests/request_etag.phpt +++ b/tests/request_etag.phpt @@ -12,10 +12,10 @@ var_dump(http_get("http://dev.iworks.at/ext-http/etag", array("etag" => '"26ad3a echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST string(%d) "HTTP/1.1 304 Not Modified -Date: %s -Server: %s +Date: %a +Server: %a ETag: "26ad3a-5-95eb19c0" " Done \ No newline at end of file diff --git a/tests/request_gzip.phpt b/tests/request_gzip.phpt index 7855a6f..81f9bc4 100644 --- a/tests/request_gzip.phpt +++ b/tests/request_gzip.phpt @@ -14,8 +14,8 @@ var_dump(http_parse_message(http_get('http://dev.iworks.at/ext-http/.print_reque echo "Done\n"; --EXPECTF-- -%sTEST -object(stdClass)%s { +%aTEST +object(stdClass)%a { ["type"]=> int(2) ["httpVersion"]=> @@ -26,7 +26,7 @@ object(stdClass)%s { string(2) "OK" ["headers"]=> array(8) { - %s + %a ["Vary"]=> string(15) "Accept-Encoding" ["Content-Length"]=> diff --git a/tests/request_methods.phpt b/tests/request_methods.phpt index 2832c80..05f6b07 100644 --- a/tests/request_methods.phpt +++ b/tests/request_methods.phpt @@ -28,7 +28,7 @@ for ($i = 0; $i < 5; ++$i) { echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST int(0) UNKNOWN int(0) diff --git a/tests/request_put_data.phpt b/tests/request_put_data.phpt index bd81a1e..a2887fd 100644 --- a/tests/request_put_data.phpt +++ b/tests/request_put_data.phpt @@ -17,6 +17,6 @@ var_dump($data === $mess->body); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) Done diff --git a/tests/send_data_001.phpt b/tests/send_data_001.phpt index 21c8d5c..2aadc8e 100644 --- a/tests/send_data_001.phpt +++ b/tests/send_data_001.phpt @@ -4,7 +4,7 @@ http_send_data() NIL-NUM range --ENV-- HTTP_RANGE=bytes=-5 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Content-Type: text/plain Accept-Ranges: bytes diff --git a/tests/send_data_002.phpt b/tests/send_data_002.phpt index e178041..8b9dd69 100644 --- a/tests/send_data_002.phpt +++ b/tests/send_data_002.phpt @@ -4,7 +4,7 @@ http_send_data() NUM-NUM range --ENV-- HTTP_RANGE=bytes=5-6 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Content-Type: text/plain Accept-Ranges: bytes diff --git a/tests/send_data_003.phpt b/tests/send_data_003.phpt index 06bc267..1fd8561 100644 --- a/tests/send_data_003.phpt +++ b/tests/send_data_003.phpt @@ -4,7 +4,7 @@ http_send_data() NUM-NIL range --ENV-- HTTP_RANGE=bytes=5981- @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Content-Type: text/plain Accept-Ranges: bytes diff --git a/tests/send_data_005.phpt b/tests/send_data_005.phpt index 4359efb..2e16105 100644 --- a/tests/send_data_005.phpt +++ b/tests/send_data_005.phpt @@ -4,7 +4,7 @@ http_send_data() oversized range --ENV-- HTTP_RANGE=bytes=5990-6000 @@ -14,5 +14,4 @@ http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- -Status: 416 -%s +Status: 416%a \ No newline at end of file diff --git a/tests/send_data_006.phpt b/tests/send_data_006.phpt index a8ab006..3112c46 100644 --- a/tests/send_data_006.phpt +++ b/tests/send_data_006.phpt @@ -4,7 +4,7 @@ http_send_data() multiple ranges --ENV-- HTTP_RANGE=bytes=0-3, 4-5,9-11 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Type: multipart/byteranges; boundary=%d.%d diff --git a/tests/send_data_007.phpt b/tests/send_data_007.phpt index a073661..3aa94c1 100644 --- a/tests/send_data_007.phpt +++ b/tests/send_data_007.phpt @@ -4,7 +4,7 @@ http_send_data() NIL-NIL range --ENV-- HTTP_RANGE=bytes=0-0 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data("abc"); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Content-Type: text/plain Accept-Ranges: bytes diff --git a/tests/send_data_008.phpt b/tests/send_data_008.phpt index a3f1962..bf8abb7 100644 --- a/tests/send_data_008.phpt +++ b/tests/send_data_008.phpt @@ -4,7 +4,7 @@ http_send_data() multiple ranges --ENV-- HTTP_RANGE=bytes=0-0,-1 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_data("01"); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Type: multipart/byteranges; boundary=%d.%d diff --git a/tests/send_failed_precond_001.phpt b/tests/send_failed_precond_001.phpt index dd394e7..c8dc1c8 100644 --- a/tests/send_failed_precond_001.phpt +++ b/tests/send_failed_precond_001.phpt @@ -15,7 +15,7 @@ http_cache_last_modified(); http_send_file(__FILE__); ?> --EXPECTF-- -Status: 412 +Status: 412%s X-Powered-By: %s Cache-Control: private, must-revalidate, max-age=0 Last-Modified: %s diff --git a/tests/send_file_005.phpt b/tests/send_file_005.phpt index 292df3c..7cecd6d 100644 --- a/tests/send_file_005.phpt +++ b/tests/send_file_005.phpt @@ -4,7 +4,7 @@ http_send_file() multiple ranges --ENV-- HTTP_RANGE=bytes=0-3, 4-5,9-11 @@ -14,7 +14,7 @@ http_send_content_type('text/plain'); http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Type: multipart/byteranges; boundary=%d.%d diff --git a/tests/send_file_006.phpt b/tests/send_file_006.phpt index 925473e..c3eceb0 100644 --- a/tests/send_file_006.phpt +++ b/tests/send_file_006.phpt @@ -4,7 +4,7 @@ http_send_file() first/last byte range --ENV-- HTTP_RANGE=bytes=0-0,-1 @@ -14,7 +14,7 @@ http_send_content_type("text/plain"); http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Type: multipart/byteranges; boundary=%d.%d diff --git a/tests/send_file_007.phpt b/tests/send_file_007.phpt index 47c4b24..eb6452d 100644 --- a/tests/send_file_007.phpt +++ b/tests/send_file_007.phpt @@ -4,7 +4,7 @@ http_send_file() NIL-NIL range --ENV-- HTTP_RANGE=bytes=0-0 @@ -13,7 +13,7 @@ HTTP_RANGE=bytes=0-0 http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Range: bytes 0-0/1010 diff --git a/tests/send_file_009.phpt b/tests/send_file_009.phpt index bc157a9..bf53901 100644 --- a/tests/send_file_009.phpt +++ b/tests/send_file_009.phpt @@ -4,7 +4,7 @@ http_send_file() NUM-NUM range --ENV-- HTTP_RANGE=bytes=5-9 @@ -13,7 +13,7 @@ HTTP_RANGE=bytes=5-9 http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Range: bytes 5-9/1010 diff --git a/tests/send_file_010.phpt b/tests/send_file_010.phpt index 20b853a..31935c5 100644 --- a/tests/send_file_010.phpt +++ b/tests/send_file_010.phpt @@ -4,7 +4,7 @@ http_send_file() NIL-NUM range --ENV-- HTTP_RANGE=bytes=-9 @@ -13,7 +13,7 @@ HTTP_RANGE=bytes=-9 http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Range: bytes 1001-1009/1010 diff --git a/tests/send_file_011.phpt b/tests/send_file_011.phpt index df6ec60..99b4388 100644 --- a/tests/send_file_011.phpt +++ b/tests/send_file_011.phpt @@ -4,7 +4,7 @@ http_send_file() NUM-NIL range --ENV-- HTTP_RANGE=bytes=1000- @@ -13,7 +13,7 @@ HTTP_RANGE=bytes=1000- http_send_file('data.txt'); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: PHP/%s Accept-Ranges: bytes Content-Range: bytes 1000-1009/1010 diff --git a/tests/send_file_013.phpt b/tests/send_file_013.phpt index e97a091..4de94b4 100644 --- a/tests/send_file_013.phpt +++ b/tests/send_file_013.phpt @@ -4,7 +4,7 @@ http_send_file() oversized range --ENV-- HTTP_RANGE=bytes=-1111 @@ -15,4 +15,5 @@ http_send_file('data.txt'); --EXPECTF-- Status: 416 X-Powered-By: PHP/%s +Accept-Ranges: bytes Content-type: %s diff --git a/tests/send_ifrange_001.phpt b/tests/send_ifrange_001.phpt index 8f85abf..b4aae05 100644 --- a/tests/send_ifrange_001.phpt +++ b/tests/send_ifrange_001.phpt @@ -4,7 +4,7 @@ http_send() If-Range --ENV-- HTTP_RANGE=bytes=0-1 @@ -15,7 +15,7 @@ http_cache_etag('abc'); http_send_file(__FILE__); ?> --EXPECTF-- -Status: 206 +Status: 206%s X-Powered-By: %s Cache-Control: private, must-revalidate, max-age=0 ETag: "abc" diff --git a/tests/send_ifrange_003.phpt b/tests/send_ifrange_003.phpt index e3ea8ea..df97814 100644 --- a/tests/send_ifrange_003.phpt +++ b/tests/send_ifrange_003.phpt @@ -4,7 +4,7 @@ http_send() If-Range --ENV-- HTTP_RANGE=bytes=0-1 @@ -22,4 +22,4 @@ Accept-Ranges: bytes Content-Length: %d Content-type: text/html -%s +%a diff --git a/tests/stream_filters_001.phpt b/tests/stream_filters_001.phpt index 73fd567..56e5228 100644 --- a/tests/stream_filters_001.phpt +++ b/tests/stream_filters_001.phpt @@ -3,7 +3,7 @@ stream filters --SKIPIF-- --FILE-- --EXPECTF-- -%sTEST +%aTEST string(30) "5 Here 2 diff --git a/tests/stream_filters_002.phpt b/tests/stream_filters_002.phpt index ad44ca0..5167e14 100644 --- a/tests/stream_filters_002.phpt +++ b/tests/stream_filters_002.phpt @@ -43,7 +43,7 @@ unlink($n); echo "Done\n"; ?> --EXPECTF-- -%sTEST +%aTEST bool(true) bool(true) bool(true) diff --git a/tests/stream_filters_003.phpt b/tests/stream_filters_003.phpt index 9e2e48f..145ec15 100644 --- a/tests/stream_filters_003.phpt +++ b/tests/stream_filters_003.phpt @@ -3,7 +3,7 @@ stream filter fun --SKIPIF-- --FILE-- @@ -36,7 +36,7 @@ foreach (str_split($text, 5) as $part) { } ?> --EXPECTF-- -%sTEST +%aTEST This is some stream filter fun; we'll see if it bails out or not. The text should come out at the other end of the stream exactly like written to it. Go figure! -- 2.30.2