From 6218c409739ab2db2a2c9d30d56925fd1936dff6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 31 Mar 2017 08:29:47 +0200 Subject: [PATCH] Fix #41 use proper proxy attribute without ending / --- tests/Client/StreamHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Client/StreamHandlerTest.php b/tests/Client/StreamHandlerTest.php index 3cb9a8e..d491064 100644 --- a/tests/Client/StreamHandlerTest.php +++ b/tests/Client/StreamHandlerTest.php @@ -375,7 +375,7 @@ public function testEmitsProgressInformationAndDebugInformation() public function testAddsProxyByProtocol() { - $url = str_replace('http', 'tcp', Server::$url); + $url = rtrim(str_replace('http', 'tcp', Server::$url), '/'); $res = $this->getSendResult(['proxy' => ['http' => $url]]); $opts = stream_context_get_options($res['body']); $this->assertEquals($url, $opts['http']['proxy']);