From: Michael Wallner Date: Sat, 19 Nov 2005 09:24:33 +0000 (+0000) Subject: - tests fixup X-Git-Tag: RELEASE_0_19_0~14 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=3b0107c29147abb7a4f972b0edfcaf7928bd288c - tests fixup --- diff --git a/tests/HttpRequestPool_001.phpt b/tests/HttpRequestPool_001.phpt index 9adf35e..6173fb6 100644 --- a/tests/HttpRequestPool_001.phpt +++ b/tests/HttpRequestPool_001.phpt @@ -14,6 +14,7 @@ checkurl('dev.iworks.at'); --FILE-- addPostFields(array('a'=>1,'b'=>2)) ; $pool->send(); + foreach ($pool as $req) { echo $req->getUrl(), '=', $req->getResponseCode(), ':', $req->getResponseMessage()->getResponseCode(), "\n"; } + foreach ($pool as $req) { try { $pool->attach(new HttpRequest('http://foo.bar')); @@ -35,11 +39,14 @@ foreach ($pool as $req) { echo ".\n"; } } + foreach ($pool as $req) { $pool->detach($req); } + echo "Done\n"; ?> + --EXPECTF-- %sTEST http://www.php.net/=200:200 diff --git a/tests/parse_message_003.phpt b/tests/parse_message_003.phpt index 56804b6..9ef5b21 100644 --- a/tests/parse_message_003.phpt +++ b/tests/parse_message_003.phpt @@ -10,7 +10,7 @@ echo "-TEST\n"; $message = "HTTP/1.1 200 Ok\n". -"Content-Range: bytes=0-1/5\n\n". +"Content-Range: bytes: 0-1/5\n\n". "OK\n"; $msg = http_parse_message($message); @@ -18,7 +18,7 @@ var_dump($msg->body); $message = "HTTP/1.1 200 Ok\n". -"Content-Range: bytes=0-1/1\n\n". +"Content-Range: bytes 0-1/1\n\n". "X\n"; $msg = http_parse_message($message); @@ -27,5 +27,5 @@ echo "Done\n"; --EXPECTF-- %sTEST string(2) "OK" -%s Invalid Content-Range header: bytes=0-1/1 in%s +%s Invalid Content-Range header: bytes 0-1/1 in%s Done diff --git a/tests/parse_message_005.phpt b/tests/parse_message_005.phpt index 0ddeb05..f86aac7 100644 --- a/tests/parse_message_005.phpt +++ b/tests/parse_message_005.phpt @@ -11,7 +11,7 @@ print_r(http_parse_message( " HTTP/1.1 206 Server: Funky/1.0 -Content-Range: bytes=0-0/100 +Content-Range: bytes: 0-0/100 1 @@ -49,7 +49,7 @@ stdClass Object [headers] => Array ( [Server] => Funky/1.0 - [Content-Range] => bytes=0-0/100 + [Content-Range] => bytes: 0-0/100 ) [body] => 1