Kraken\_Unit\Network\Http\HttpRequestTest::testApiEncode_EncodesProtocol PHP Method

testApiEncode_EncodesProtocol() public method

    public function testApiEncode_EncodesProtocol()
    {
        $method = 'GET';
        $uri = '/index.html';
        $headers = ['Cache-Control' => 'no-cache, must-revalidate, max-age=0', 'Connection' => 'keep-alive', 'Content-Encoding' => 'gzip', 'Content-Type' => 'text/html; charset=iso-8859-2', 'Date' => 'Tue, 23 Aug 2016 18:27:12 GMT'];
        $body = 'text message';
        $vers = '1.1';
        $req = $this->createRequest($method, $uri, $headers, $body, $vers);
        $expected = sprintf("%s %s HTTP/%s\r\n%s\r\n%s", $method, $uri, $vers, $this->callProtectedMethod($req, 'encodeHeaders', [$headers]), $body);
        $this->assertSame($expected, $req->encode());
    }