GuzzleHttp\Test\Handler\StreamHandlerTest::testAddsProxyByProtocol PHP Method

testAddsProxyByProtocol() public method

    public function testAddsProxyByProtocol()
    {
        $url = str_replace('http', 'tcp', Server::$url);
        $res = $this->getSendResult(['proxy' => ['http' => $url]]);
        $opts = stream_context_get_options($res->getBody()->detach());
        $this->assertEquals($url, $opts['http']['proxy']);
    }