- fix tests
authorMichael Wallner <mike@php.net>
Sat, 29 Oct 2005 18:16:39 +0000 (18:16 +0000)
committerMichael Wallner <mike@php.net>
Sat, 29 Oct 2005 18:16:39 +0000 (18:16 +0000)
tests/HttpRequestPool_003.phpt
tests/chunked_decode_003.phpt

index c89efa44f1d06d49e432f2548af0b97cb4587215..48f6adfe9bc7864f9e84063b582bddb252d3120b 100644 (file)
@@ -2,7 +2,7 @@
 HttpRequestPool chain
 --SKIPIF--
 <?php
-inlcude 'skip.inc';
+include 'skip.inc';
 checkcls('HttpRequest');
 checkcls('HttpRequestPool');
 ?>
@@ -48,8 +48,9 @@ class Pool extends HttpRequestPool
                                        HttpRequest::METH_GET,
                                        array(
                                                'redirect'      => 5,
-                                               'timeout'       => 50,
-                                               'connecttimeout' => 10,
+                        'compress'  => GZIP,
+                                               'timeout'       => TOUT,
+                                               'connecttimeout' => TOUT,
                                                'lastmodified' => is_file($file)?filemtime($file):0
                                        )
                                )
@@ -93,10 +94,10 @@ class Pool extends HttpRequestPool
                                                $url,
                                                HttpRequest::METH_GET,
                                                array(
-                                                       'redirect'      => 3,
-                                                       'timeout'       => 25,
-                                                       'compress'      => true,
-                                                       'connecttimeout' => 10,
+                                                       'redirect'      => 5,
+                                                       'compress'      => GZIP,
+                                                       'timeout'       => TOUT,
+                                                       'connecttimeout' => TOUT,
                                                        'lastmodified' => is_file($file)?filemtime($file):0
                                                )
                                        )
@@ -107,11 +108,13 @@ class Pool extends HttpRequestPool
        }
 }
 
+define('GZIP', true);
+define('TOUT', 50);
 define('RMAX', 10);
 chdir(dirname(__FILE__));
 
 $time = microtime(true);
-new Pool();
+$p = new Pool();
 printf("Elapsed: %0.3fs\n", microtime(true)-$time);
 
 echo "Done\n";
index 5af29a49fdc83377082923b7947253b9344465f7..0081bbee3ca16c84f0df93f767235bd403a44c41 100644 (file)
@@ -20,7 +20,7 @@ var_dump(http_chunked_decode($data));
 ?>
 --EXPECTF--
 %sTEST
-%sWarning%s:%shttp_chunked_decode()%sTruncated message: chunk size %d exceeds remaining data size %d at pos %d of %d%s
+%sWarning%shttp_chunked_decode()%sTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%s
 string(24) "abra
 cadabra
 all we got