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

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

    public function testHandles100Continue()
    {
        Server::flush();
        Server::enqueue([new Psr7\Response(200, ['Test' => 'Hello', 'Content-Length' => 4], 'test')]);
        $request = new Psr7\Request('PUT', Server::$url, ['Expect' => '100-Continue'], 'test');
        $handler = new Handler\CurlMultiHandler();
        $response = $handler($request, [])->wait();
        $this->assertEquals(200, $response->getStatusCode());
        $this->assertEquals('OK', $response->getReasonPhrase());
        $this->assertEquals('Hello', $response->getHeaderLine('Test'));
        $this->assertEquals('4', $response->getHeaderLine('Content-Length'));
        $this->assertEquals('test', (string) $response->getBody());
    }