From: Michael Wallner Date: Mon, 7 Sep 2015 11:42:25 +0000 (+0200) Subject: don't rely on external services (tm) X-Git-Tag: RELEASE_2_5_2~4 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=d83f26991f47c43ec80d353a5b8ff99dabba528b don't rely on external services (tm) --- diff --git a/tests/bug66388.phpt b/tests/bug66388.phpt index e4cbf2a..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=== --EXPECTF-- Test -40%d +200 ===DONE===