improve negotiation precision
[m6w6/ext-http] / tests / client016.phpt
1 --TEST--
2 client once & wait with events
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_client_test();
7 ?>
8 --FILE--
9 <?php
10
11 include "helper/server.inc";
12
13 echo "Test\n";
14
15 server("proxy.inc", function($port) {
16 $request = new http\Client\Request("GET", "http://localhost:$port/");
17
18 foreach (http\Client::getAvailableDrivers() as $driver) {
19 $client = new http\Client($driver);
20 $client->configure(array("use_eventloop" => true));
21 $client->enqueue($request);
22
23 while ($client->once()) {
24 $client->wait(.1);
25 }
26
27 if (!$client->getResponse()) {
28 var_dump($client);
29 }
30 }
31 });
32 ?>
33 Done
34 --EXPECT--
35 Test
36 Done