reduce count of online tests
[m6w6/ext-http] / tests / client008.phpt
index 2585f235d0b3e07456aee66fef8315ee12e156f7..41c3e681b9b5bc1a221b9ea46d677a11770fcaa1 100644 (file)
@@ -3,28 +3,35 @@ client features
 --SKIPIF--
 <?php
 include "skipif.inc";
-skip_online_test();
+skip_client_test();
 ?>
 --FILE--
 <?php
-echo "Test\n";
 
-$request = new http\Client\Request("GET", "http://www.example.org");
+include "server.inc";
 
-foreach (http\Client::getAvailableDrivers() as $driver) {
-       $client = new http\Client($driver);
-       $client->configure(["pipelining" => true, "use_eventloop" => true]);
+echo "Test\n";
+
+server("pipeline.inc", function($port, $stdin) {
+       fputs($stdin, "2\n");
        
+       $request = new http\Client\Request("GET", "http://localhost:$port");
+       
+       $client = new http\Client();
+       $client->configure(["pipelining" => true, "use_eventloop" => true]);
+
        $client->enqueue($request);
+       $client->send();
+       
        $client->enqueue(clone $request);
        $client->enqueue(clone $request);
-       
+
        $client->send();
-       
+
        while ($client->getResponse()) {
                echo "R\n";
        }
-}
+});
 
 ?>
 Done