projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge branch 'v3.1.x'
[m6w6/ext-http]
/
tests
/
client008.phpt
diff --git
a/tests/client008.phpt
b/tests/client008.phpt
index 31584d30c548e36372ef2695ec01c9607a90f6a8..3f5641fdf040dd1d8ca9e1e8a15e9cf42444bccc 100644
(file)
--- a/
tests/client008.phpt
+++ b/
tests/client008.phpt
@@
-1,31
+1,37
@@
--TEST--
--TEST--
-client
features
+client
configuration
--SKIPIF--
<?php
include "skipif.inc";
--SKIPIF--
<?php
include "skipif.inc";
-skip_
online
_test();
+skip_
client
_test();
?>
--FILE--
<?php
?>
--FILE--
<?php
-echo "Test\n";
-$request = new http\Client\Request("GET", "http://www.example.org");
+include "helper/server.inc";
+
+echo "Test\n";
-foreach (http\Client::getAvailableDrivers() as $driver) {
- $client = new http\Client($driver);
- $client->enablePipelining(true);
- $client->enableEvents(true);
+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(array("pipelining" => true, "use_eventloop" => true));
+
$client->enqueue($request);
$client->enqueue($request);
+ $client->send();
+
$client->enqueue(clone $request);
$client->enqueue(clone $request);
$client->enqueue(clone $request);
$client->enqueue(clone $request);
-
+
$client->send();
$client->send();
-
+
while ($client->getResponse()) {
echo "R\n";
}
while ($client->getResponse()) {
echo "R\n";
}
-}
+}
);
?>
Done
?>
Done