let DEV_2 be trunk
[m6w6/ext-http] / tests / client005.phpt
diff --git a/tests/client005.phpt b/tests/client005.phpt
new file mode 100644 (file)
index 0000000..36a3f0a
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+client response callback
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+foreach (http\Client::getAvailableDrivers() as $driver) {
+       $client = new http\Client($driver);
+       $client->enqueue(new http\Client\Request("GET", "http://www.example.org"), function($response) {
+               echo "R\n";
+               if (!($response instanceof http\Client\Response)) {
+                       var_dump($response);
+               }
+       });
+       $client->send();
+}
+
+?>
+Done
+--EXPECTREGEX--
+Test
+(?:R
+)+Done