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 pull request #113 from Whissi/fix-undefined-array-key-PATH
[m6w6/ext-http]
/
tests
/
client017.phpt
diff --git
a/tests/client017.phpt
b/tests/client017.phpt
index a50502803590a0e93c366f51569127b3503ea391..833287a6b2b3824362f2343102089138c9fbc433 100644
(file)
--- a/
tests/client017.phpt
+++ b/
tests/client017.phpt
@@
-3,31
+3,36
@@
client request gzip
--SKIPIF--
<?php
include "skipif.inc";
--SKIPIF--
<?php
include "skipif.inc";
-skip_online_test();
skip_client_test();
?>
--FILE--
<?php
skip_client_test();
?>
--FILE--
<?php
-
echo "Test\n
";
+
include "helper/server.inc
";
-$client = new http\Client;
-$client->setOptions(array("compress" => true));
+echo "Test\n";
-$client->enqueue(new http\Client\Request("GET", "http://dev.iworks.at/ext-http/.print_request.php"));
-$client->send();
+server("env.inc", function($port) {
+ $request = new http\Client\Request("GET", "http://localhost:$port/");
+
+ $client = new http\Client;
+ $client->setOptions(array("compress" => true));
-echo $client->getResponse();
+ $client->enqueue($request);
+ $client->send();
+ echo $client->getResponse();
+});
?>
===DONE===
--EXPECTF--
Test
HTTP/1.1 200 OK
?>
===DONE===
--EXPECTF--
Test
HTTP/1.1 200 OK
+Accept-Ranges: bytes
+X-Request-Content-Length: 0
Vary: Accept-Encoding
Vary: Accept-Encoding
-Content-Type: text/html
-Date: %s
-Server: %s
+Etag: "%s"
X-Original-Transfer-Encoding: chunked
X-Original-Transfer-Encoding: chunked
-X-Original-Content-Encoding:
gzip
-===DONE===
\ No newline at end of file
+X-Original-Content-Encoding:
deflate
+===DONE===
+