projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- avoid endless loop if attach() is called while the iterator is active
[m6w6/ext-http]
/
tests
/
HttpRequestPool_001.phpt
diff --git
a/tests/HttpRequestPool_001.phpt
b/tests/HttpRequestPool_001.phpt
index d8bff6ec6772d9c086a9ab6702bca140eea7aec8..a42650ffcf8a1cf069d5223b8e88aad14a36c2ea 100644
(file)
--- a/
tests/HttpRequestPool_001.phpt
+++ b/
tests/HttpRequestPool_001.phpt
@@
-26,6
+26,16
@@
foreach ($pool as $req) {
$req->getResponseCode(), ':',
$req->getResponseMessage()->getResponseCode(), "\n";
}
$req->getResponseCode(), ':',
$req->getResponseMessage()->getResponseCode(), "\n";
}
+foreach ($pool as $req) {
+ try {
+ $pool->attach(new HttpRequest('http://foo.bar'));
+ } catch (HttpRequestPoolException $x) {
+ echo ".\n";
+ }
+}
+foreach ($pool as $req) {
+ $pool->detach($req);
+}
echo "Done\n";
?>
--EXPECTF--
echo "Done\n";
?>
--EXPECTF--
@@
-34,4
+44,8
@@
http://www.php.net/=200:200
http://pear.php.net/=200:200
http://pecl.php.net/=200:200
http://dev.iworks.at/.print_request.php=200:200
http://pear.php.net/=200:200
http://pecl.php.net/=200:200
http://dev.iworks.at/.print_request.php=200:200
+.
+.
+.
+.
Done
Done