X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2FHttpRequestPool_002.phpt;h=94fd2c5464b832932a1c72c30de6f574e5eb09a7;hp=053f1f6b76804c3d769b229c516f1f3e4aeaf1dd;hb=6c4a552c1ad7b0018afb57a3d0028c2be166a30a;hpb=aa931f5b858c3d8513e883ae913f0704557ca540 diff --git a/tests/HttpRequestPool_002.phpt b/tests/HttpRequestPool_002.phpt index 053f1f6..94fd2c5 100644 --- a/tests/HttpRequestPool_002.phpt +++ b/tests/HttpRequestPool_002.phpt @@ -4,6 +4,7 @@ extending HttpRequestPool --FILE-- socketPerform()) { - $this->handleRequests(); if (!$this->socketSelect()) { throw new HttpSocketException; } } - $this->handleRequests(); } - private function handleRequests() + protected final function socketPerform() { + $result = parent::socketPerform(); + echo "."; foreach ($this->getFinishedRequests() as $r) { echo "=", $r->getResponseCode(), "="; $this->detach($r); } + + return $result; } } $pool = new MyPool( new HttpRequest('http://www.php.net/', HTTP_METH_HEAD), - new HttpRequest('http://at.php.net/', HTTP_METH_HEAD), - new HttpRequest('http://de.php.net/', HTTP_METH_HEAD), - new HttpRequest('http://ch.php.net/', HTTP_METH_HEAD) + new HttpRequest('http://www.php.net/', HTTP_METH_HEAD), + new HttpRequest('http://www.php.net/', HTTP_METH_HEAD) ); $pool->send(); @@ -45,5 +47,5 @@ echo "\nDone\n"; ?> --EXPECTREGEX-- .+TEST -\.+=200=\.+=200=\.+=200=\.+=200= +\.*=200=\.*=200=\.*=200= Done