From d83f26991f47c43ec80d353a5b8ff99dabba528b Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 7 Sep 2015 13:42:25 +0200 Subject: [PATCH] don't rely on external services (tm) --- tests/bug66388.phpt | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) 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=== -- 2.30.2