let DEV_2 be trunk
[m6w6/ext-http] / tests / HttpRequestPool_006.phpt
diff --git a/tests/HttpRequestPool_006.phpt b/tests/HttpRequestPool_006.phpt
deleted file mode 100644 (file)
index 043c208..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-HttpRequestPool detaching in callbacks
---SKIPIF--
-<?php
-include 'skip.inc';
-checkcls("HttpRequestPool");
-checkurl("at.php.net");
-checkurl("de.php.net");
-?>
---FILE--
-<?php
-echo "-TEST\n";
-class r extends HttpRequest {
-       function onProgress() {
-               static $i = array();
-               if (empty($i[$this->getUrl()])) {
-                       $i[$this->getUrl()] = true;
-                       try {
-                               $GLOBALS['p']->detach($this);
-                       } catch (Exception $ex) {
-                               echo $ex, "\n";
-                       }
-               }
-       }
-       function onFinish() {
-               $GLOBALS['p']->detach($this);
-       }
-}
-$p = new HttpRequestPool(new r("http://at.php.net"), new r("http://de.php.net"));
-$p->send();
-var_dump($p->getAttachedRequests());
-echo "Done\n";
-?>
---EXPECTF--
-%aTEST
-exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d
-Stack trace:
-#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
-#1 [internal function]: r->onProgress(Array)
-#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send()
-#3 {main}
-exception 'HttpRequestPoolException' with message 'HttpRequest object(#%d) cannot be detached from the HttpRequestPool while executing the progress callback' in %aHttpRequestPool_006.php:%d
-Stack trace:
-#0 %aHttpRequestPool_006.php(%d): HttpRequestPool->detach(Object(r))
-#1 [internal function]: r->onProgress(Array)
-#2 %aHttpRequestPool_006.php(%d): HttpRequestPool->send()
-#3 {main}
-array(0) {
-}
-Done