fix tests
[m6w6/ext-http] / tests / clientresponse002.phpt
index 8c57355b46b016cbfc64fca948b44c83add6f6a0..def4b3f5082cb2efa4739127f25108ce65b3548d 100644 (file)
@@ -3,21 +3,25 @@ client response cookies
 --SKIPIF--
 <?php
 include "skipif.inc";
-skip_online_test();
 skip_client_test();
 ?>
 --FILE--
 <?php
-echo "Test\n";
 
-$request = new http\Client\Request("GET", "http://dev.iworks.at/ext-http/.cookie.php");
+include "helper/server.inc";
+
+echo "Test\n";
 
-foreach (http\Client::getAvailableDrivers() as $driver) {
-       $client = new http\Client($driver);
-       foreach($client->enqueue($request)->send()->getResponse()->getCookies(0, array("comment")) as $cookies) {
-               var_dump($cookies->toArray());
+server("cookie2.inc", function($port) {
+       $request = new http\Client\Request("GET", "http://localhost:$port");
+       
+       foreach (http\Client::getAvailableDrivers() as $driver) {
+               $client = new http\Client($driver);
+               foreach($client->enqueue($request)->send()->getResponse()->getCookies(0, array("comment")) as $cookies) {
+                       var_dump($cookies->toArray());
+               }
        }
-}
+});
 ?>
 Done
 --EXPECTREGEX--