back to dev [ci skip]
[m6w6/ext-http] / tests / client008.phpt
1 --TEST--
2 client features
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("pipeline.inc", function($port, $stdin) {
16 fputs($stdin, "2\n");
17
18 $request = new http\Client\Request("GET", "http://localhost:$port");
19
20 $client = new http\Client();
21 $client->configure(array("pipelining" => true, "use_eventloop" => true));
22
23 $client->enqueue($request);
24 $client->send();
25
26 $client->enqueue(clone $request);
27 $client->enqueue(clone $request);
28
29 $client->send();
30
31 while ($client->getResponse()) {
32 echo "R\n";
33 }
34 });
35
36 ?>
37 Done
38 --EXPECTREGEX--
39 Test
40 (?:R
41 R
42 R
43 )+Done