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