Kraken\_Unit\Network\Http\HttpResponseTest::testProtectedApiEncodeHeaders_EncodesMultipleHeaders PHP Метод

testProtectedApiEncodeHeaders_EncodesMultipleHeaders() публичный Метод

    public function testProtectedApiEncodeHeaders_EncodesMultipleHeaders()
    {
        $req = $this->createResponse();
        $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']];
        $expected = '';
        $expected .= "Cache-Control: no-cache, must-revalidate, max-age=0\r\n";
        $expected .= "Connection: keep-alive\r\n";
        $expected .= "Content-Encoding: gzip\r\n";
        $expected .= "Content-Type: text/html; charset=iso-8859-2\r\n";
        $expected .= "Date: Tue, 23 Aug 2016 18:27:12 GMT\r\n";
        $result = $this->callProtectedMethod($req, 'encodeHeaders', [$headers]);
        $this->assertSame($expected, $result);
    }