- fix builds and tests without libcurl linked in
[m6w6/ext-http] / tests / HttpRequestPool_001.phpt
1 --TEST--
2 HttpRequestPool
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkver(5);
7 checkcls('HttpRequestPool');
8 checkurl('www.php.net');
9 checkurl('pear.php.net');
10 checkurl('pecl.php.net');
11 ?>
12 --FILE--
13 <?php
14 echo "-TEST\n";
15 $pool = new HttpRequestPool(
16 new HttpRequest('http://www.php.net/', HTTP_HEAD),
17 new HttpRequest('http://pear.php.net/', HTTP_HEAD),
18 new HttpRequest('http://pecl.php.net/', HTTP_HEAD)
19 );
20 $pool->send();
21 foreach ($pool as $req) {
22 echo $req->getUrl(), '=',
23 $req->getResponseCode(), ':',
24 $req->getResponseMessage()->getResponseCode(), "\n";
25 }
26 echo "Done\n";
27 ?>
28 --EXPECTF--
29 %sTEST
30 http://www.php.net/=200:200
31 http://pear.php.net/=200:200
32 http://pecl.php.net/=200:200
33 Done