GuzzleHttp\Test\Handler\CurlFactoryTest::addDecodeResponse PHP Метод

addDecodeResponse() приватный Метод

private addDecodeResponse ( $withEncoding = true )
    private function addDecodeResponse($withEncoding = true)
    {
        $content = gzencode('test');
        $headers = ['Content-Length' => strlen($content)];
        if ($withEncoding) {
            $headers['Content-Encoding'] = 'gzip';
        }
        $response = new Psr7\Response(200, $headers, $content);
        Server::flush();
        Server::enqueue([$response]);
        return $content;
    }