- fixup tests
authorMichael Wallner <mike@php.net>
Wed, 26 Sep 2007 06:18:00 +0000 (06:18 +0000)
committerMichael Wallner <mike@php.net>
Wed, 26 Sep 2007 06:18:00 +0000 (06:18 +0000)
26 files changed:
tests/build_url_003.phpt
tests/match_request_header_001.phpt
tests/negotiation_001.phpt
tests/ob_deflatehandler_001.phpt
tests/parse_cookie_001.phpt
tests/parse_cookie_002.phpt
tests/parse_message_001.phpt
tests/parse_message_004.phpt
tests/parse_params_001.phpt
tests/persistent_handles_002.phpt
tests/request_gzip.phpt
tests/request_put_data.phpt
tests/send_data_001.phpt
tests/send_data_002.phpt
tests/send_data_003.phpt
tests/send_data_004.phpt
tests/send_data_005.phpt
tests/send_data_006.phpt
tests/send_data_007.phpt
tests/send_data_008.phpt
tests/send_file_005.phpt
tests/send_file_006.phpt
tests/send_file_007.phpt
tests/send_ifrange_001.phpt
tests/send_ifrange_003.phpt
tests/stream_filters_001.phpt

index cd9c0a3417936b5c0a16cc967cb6a6cb43e5cb5b..cb2d84f2c8c83d800345b4a6466a764b1196fb9c 100644 (file)
@@ -3,6 +3,7 @@ http_build_url()
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 ?>
 --ENV--
 HTTP_HOST=www.example.com
index 2d0f47ee58bf76165818d609e2a576a56bb57575..b832f34deda2287176252683fd169d79eb3bf779 100644 (file)
@@ -3,6 +3,7 @@ http_match_request_header()
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 ?>
 --ENV--
 HTTP_FOO=bar
index 3641455fd9e9f09804a47c8629ca3fe1d8ba4f9c..89a8e49bb3595cbfaf64ee1b85a4e389163c16c9 100644 (file)
@@ -3,6 +3,7 @@ negotiation
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 ?>
 --ENV--
 HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8
index ba39581835a5b5f3967082479b405f4cdaf71d29..2d7a059a2878987cc2ba7d263b8fd6e31cd30647 100644 (file)
@@ -4,6 +4,7 @@ ob_deflatehandler
 <?php
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib");
 ?>
 --ENV--
index d17c78d43dad2c116836be3ac181cb68b710950a..a3dbe605e8f19618ec426bb2f2323e1b4f92f468 100644 (file)
@@ -14,7 +14,7 @@ echo "Done\n";
 ?>
 --EXPECTF--
 %sTEST
-object(stdClass)#%d (%d) {
+object(stdClass)%s {
   ["cookies"]=>
   array(3) {
     ["name"]=>
index 3aa38f244840eecfdfe2f4b4706d0c8b522d8f05..f40c823f2dee4d1fc7de907f3dbc6ff0103852d8 100644 (file)
@@ -3,6 +3,7 @@ parse cookie
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 ?>
 --FILE--
 <?php
index ac31338ebbfb90822afa14274a6c2da9d76914c4..84c874c12392fac8b0c05a77a39aab5c791864a2 100644 (file)
@@ -9,7 +9,8 @@ skipif(!http_support(HTTP_SUPPORT_REQUESTS), 'need curl support');
 --FILE--
 <?php
 echo "-TEST\n";
-echo http_parse_message(http_get('http://www.google.com'))->body;
+$m = http_parse_message(http_get('http://www.google.com'));
+echo $m->body;
 echo "Done\n";
 --EXPECTF--
 %sTEST
index 653d08326b1248cb7ec8e1e1b17f9bc6c89857ad..759065ccae26a7d6a8ed742b07f270403a2738dd 100644 (file)
@@ -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"]=>
index 1dc452eddf0fbfe630203acaca70fea5274deab0..dde2780cff011bd6a9d648df4f93faa630561478 100644 (file)
@@ -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]=>
index 6efa9cbfaecc71d0c0fe8cb129e929bf6d519bb6..fb4c8fa721b45f12f24125cae83507ad94cf1693 100644 (file)
@@ -3,6 +3,7 @@ persistent handles
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support");
 skipif(function_exists('zend_thread_id'), "need non-ZTS build");
 ?>
@@ -25,7 +26,8 @@ foreach (http_persistent_handles_count() as $provider => $idents) {
 http_get("http://www.google.com/", null, $info[]);
 
 echo "One free request handle within GLOBAL: ";
-var_dump(http_persistent_handles_count()->http_request["GLOBAL"]["free"]);
+$h = http_persistent_handles_count();
+var_dump($h->http_request["GLOBAL"]["free"]);
 
 echo "Reusing request handle: ";
 http_get("http://www.google.com/", null, $info[]);
index 4493d8c1750627ca69830fffbcc6909b0b7bb722..7855a6f691f4f065f739024252cf254f58869798 100644 (file)
@@ -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"]=>
index be90a82d780c081354d994d1bd4c9931119363d5..bd81a1e57ab7dbb42a195efebb26ba58151360e4 100644 (file)
@@ -9,7 +9,10 @@ skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support");
 <?php
 echo "-TEST\n";
 
-var_dump(str_repeat("abc", 6000) === http_parse_message(http_put_data("http://dev.iworks.at/ext-http/.print_put.php5", str_repeat("abc", 6000/* > 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";
 ?>
index e5c68405435e6409d9750c3342eeb1513ab3a309..21c8d5c6d1e4984177aa40ec12e387fe53d8e6c6 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() NIL-NUM range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=-5
index af7e866601a320177659cf0aa14313ff3c3eb616..e178041bbba8ab262921e0350f4a023ff18dfa99 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() NUM-NUM range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=5-6
index c13ec8002fae21496b29a1bcc1b8eb67b1d5e75b..06bc26771202430a54db5b50444c692a43b573d5 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() NUM-NIL range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=5981-
index 6237a425dca7be46b3f2f617e247b2e0e6899d03..12223fde512e8c94a1b55d34cbaaeff284e45638 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() syntactically invalid range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=123,-wtf ?
index 28cbb786ef0ed49506baafb46bf469d34a1a3dbb..4359efbb16e0bf7ea4b02666a479e1d0a10aff5e 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() oversized range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=5990-6000
index 43d7a93ca810d50e067b4b51b5aa21129f8f9e1e..a8ab006ebbdbac2bb5650f8265a814b866b41e13 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() multiple ranges
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-3, 4-5,9-11
index 91dedaa5f470568378be3d9eb452ce70f715da76..a0736617a58b76db40456c0d88596c23cb35e66a 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() NIL-NIL range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-0
index 7de621d9c946f8cd1d278286b7634dee0d2b8a23..a3f196232a6ff74aaeb66c6c6b260f5a5840432a 100644 (file)
@@ -4,6 +4,7 @@ http_send_data() multiple ranges
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-0,-1
index d6705ea1f3101cddbf882c2a6b7accd4625c8a9b..292df3c084178ac6e6f268124c7f3a5c484b36a1 100644 (file)
@@ -4,6 +4,7 @@ http_send_file() multiple ranges
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-3, 4-5,9-11
index e778805bac310384bf0c9678cc4e653e33b67c35..925473e6fa31fe1dab368dca103475f991d5e627 100644 (file)
@@ -4,6 +4,7 @@ http_send_file() first/last byte range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-0,-1
index 1ee12cca21cb27a3ebbddf0d2d0718a3d2b6eb75..47c4b24380f4410936d1b8b658eea449a29f1ab8 100644 (file)
@@ -4,6 +4,7 @@ http_send_file() NIL-NIL range
 <?php 
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-0
index 9b3697197ade931d2f1660fee1145ac72b048deb..8f85abf8669d9eb7cd71514a434aa90b165438f4 100644 (file)
@@ -4,6 +4,7 @@ http_send() If-Range
 <?php
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-1
index 746d9c73daa8f8253f06b8e9b678907eb432ba8a..e3ea8ea84be46fc72138d94c899814c27a8204c3 100644 (file)
@@ -4,6 +4,7 @@ http_send() If-Range
 <?php
 include 'skip.inc';
 checkcgi();
+checkmin(5);
 ?>
 --ENV--
 HTTP_RANGE=bytes=0-1
index 533b23760bd3eb01053e415989f09bb46f1ad041..73fd5677cec933500e2b9327f4fd3e3f8bd33110 100644 (file)
@@ -3,6 +3,7 @@ stream filters
 --SKIPIF--
 <?php
 include 'skip.inc';
+checkmin(5);
 ?>
 --FILE--
 <?php