From 597319011750ceaf7e156fe8bc03574e7f4e399b Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 12 Feb 2015 11:12:42 +0100 Subject: [PATCH] reorder --- tests/client002.phpt | 2 +- tests/client003.phpt | 2 +- tests/client004.phpt | 2 +- tests/client005.phpt | 2 +- tests/client006.phpt | 2 +- tests/client007.phpt | 2 +- tests/client008.phpt | 2 +- tests/client013.phpt | 2 +- tests/client015.phpt | 2 +- tests/client016.phpt | 2 +- tests/clientresponse003.phpt | 2 +- tests/pipeline.inc | 25 ---------------- tests/pipeline001.phpt | 56 ------------------------------------ tests/propertyproxy001.phpt | 2 ++ tests/proxy.inc | 21 -------------- tests/proxy001.phpt | 47 ------------------------------ tests/proxy002.phpt | 42 --------------------------- tests/server.inc | 36 ----------------------- 18 files changed, 13 insertions(+), 238 deletions(-) delete mode 100644 tests/pipeline.inc delete mode 100644 tests/pipeline001.phpt delete mode 100644 tests/proxy.inc delete mode 100644 tests/proxy001.phpt delete mode 100644 tests/proxy002.phpt delete mode 100644 tests/server.inc diff --git a/tests/client002.phpt b/tests/client002.phpt index e07b82e..aeb2d8a 100644 --- a/tests/client002.phpt +++ b/tests/client002.phpt @@ -8,7 +8,7 @@ skip_client_test(); --FILE-- setEnvRequest($msg) - ->setHeader("X-Req", $msg->getRequestUrl()) - ->send($client); -} - -serve(function($client) { - $count = trim(fgets(STDIN)); - - /* the peek message */ - respond($client, new http\Message($client, false)); - - /* pipelined messages */ - $req = array(); - for ($i=0; $i < $count; ++ $i) { - $req[] = new http\Message($client, false); - } - foreach ($req as $msg) { - respond($client, $msg); - } -}); diff --git a/tests/pipeline001.phpt b/tests/pipeline001.phpt deleted file mode 100644 index 54707df..0000000 --- a/tests/pipeline001.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -pipelining ---SKIPIF-- - ---FILE-- -configure(["pipelining" => true, "max_host_connections" => 0]); - - /* this is just to let curl know the server may be capable of pipelining */ - $client->enqueue(new http\Client\Request("GET", "http://localhost:$port")); - $client->send(); - - $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/1")); - $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/2")); - $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/3")); - $client->send(); - - while (($response = $client->getResponse())) { - echo $response; - } -}); - -?> -===DONE=== ---EXPECT-- -Test -HTTP/1.1 200 OK -X-Req: /3 -Etag: "" -X-Original-Transfer-Encoding: chunked -HTTP/1.1 200 OK -X-Req: /2 -Etag: "" -X-Original-Transfer-Encoding: chunked -HTTP/1.1 200 OK -X-Req: /1 -Etag: "" -X-Original-Transfer-Encoding: chunked -HTTP/1.1 200 OK -X-Req: / -Etag: "" -X-Original-Transfer-Encoding: chunked -===DONE=== diff --git a/tests/propertyproxy001.phpt b/tests/propertyproxy001.phpt index 552a713..1001f8e 100644 --- a/tests/propertyproxy001.phpt +++ b/tests/propertyproxy001.phpt @@ -4,6 +4,8 @@ property proxy +--XFAIL-- +TBD --FILE-- getHeader("Proxy-Connection")) { - $response = new http\Env\Response; - $response->send($client); - - /* soak up the request following the connect */ - new http\Message($client, false); - } - - /* return the initial message as response body */ - $response = new http\Env\Response; - $response->getBody()->append($request); - $response->send($client); -}); diff --git a/tests/proxy001.phpt b/tests/proxy001.phpt deleted file mode 100644 index c3a5905..0000000 --- a/tests/proxy001.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -proxy - send proxy headers for a proxy request ---SKIPIF-- - ---FILE-- -setOptions(array( - "timeout" => 3, - "proxytunnel" => true, - "proxyheader" => array("Hello" => "there!"), - "proxyhost" => "localhost", - "proxyport" => $port, - )); - try { - $c->enqueue($r)->send(); - } catch (Exception $e) { - echo $e; - } - echo $c->getResponse()->getBody(); - unset($r, $client); -}); - -?> -===DONE=== ---EXPECTF-- -Test -Server on port %d -CONNECT www.example.com:80 HTTP/1.1 -Host: www.example.com:80 -User-Agent: PECL_HTTP/%s PHP/%s libcurl/%s -Proxy-Connection: Keep-Alive -Hello: there! -Content-Length: 0 -===DONE=== diff --git a/tests/proxy002.phpt b/tests/proxy002.phpt deleted file mode 100644 index ce548a5..0000000 --- a/tests/proxy002.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -proxy - don't send proxy headers for a standard request ---SKIPIF-- - ---FILE-- -setOptions(array( - "timeout" => 3, - "proxyheader" => array("Hello" => "there!"), - )); - try { - $c->enqueue($r)->send(); - } catch (Exception $e) { - echo $e; - } - echo $c->getResponse()->getBody(); - unset($r, $client); -}); - -?> -===DONE=== ---EXPECTF-- -Test -Server on port %d -GET / HTTP/1.1 -User-Agent: PECL_HTTP/%s PHP/%s libcurl/%s -Host: localhost:%d -Accept: */* -Content-Length: 0 -===DONE=== diff --git a/tests/server.inc b/tests/server.inc deleted file mode 100644 index ca20cb0..0000000 --- a/tests/server.inc +++ /dev/null @@ -1,36 +0,0 @@ -