From 6a5ec2c676458f24e191801ee20bce02691138b6 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 13 Jun 2005 15:22:47 +0000 Subject: [PATCH] - request pool test --- tests/HttpRequestPool_001.phpt | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/HttpRequestPool_001.phpt diff --git a/tests/HttpRequestPool_001.phpt b/tests/HttpRequestPool_001.phpt new file mode 100644 index 0000000..d68330f --- /dev/null +++ b/tests/HttpRequestPool_001.phpt @@ -0,0 +1,38 @@ +--TEST-- +HttpRequestPool +--SKIPIF-- + (int) PHP_VERSION) and die('skip PHP5 is required for Http classes'); +?> +--FILE-- +attach($reqs[] = new HttpRequest($url, HTTP_HEAD)); +} +$pool->send(); +foreach ($reqs as $req) { + echo $req->getResponseInfo('effective_url'), '=', + $req->getResponseCode(), ':', + $req->getResponseMessage()->getResponseCode(), "\n"; + $pool->detach($req); + $pool->attach($req); +} +$pool->send(); +$pool->reset(); +echo "Done\n"; +?> +--EXPECTF-- +Content-type: text/html +X-Powered-By: PHP/%s + +http://www.php.net/=200:200 +http://pear.php.net/=200:200 +http://pecl.php.net/=200:200 +Done -- 2.30.2