X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fbug66388.phpt;h=77d50c7349384823b71ed5f7272a343a2ca1cdd6;hp=9f9c95e9ed1aa723fe3b41c717e0850b9715f10c;hb=688a70d8590cc4cac2d39f24baf8d99ebd9fec06;hpb=74bfc0cd7185a668af2e61c9d2a6670814825517 diff --git a/tests/bug66388.phpt b/tests/bug66388.phpt index 9f9c95e..77d50c7 100644 --- a/tests/bug66388.phpt +++ b/tests/bug66388.phpt @@ -11,23 +11,27 @@ skip_online_test(); use http\Client, http\Client\Request; +include "helper/server.inc"; + echo "Test\n"; -$client = new Client(); -$request = new Request( - 'POST', - 'https://api.twitter.com/oauth/request_token', - array( - 'Content-Length' => 0 - ) -); -$client->enqueue($request); -echo $client->send()->getResponse()->getResponseCode(); +server("proxy.inc", function($port) { + $client = new Client(); + $request = new Request( + 'POST', + "http://localhost:$port/", + array( + 'Content-Length' => 0 + ) + ); + $client->enqueue($request); + echo $client->send()->getResponse()->getResponseCode(); +}); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- Test -401 +200 ===DONE===