Curl\CurlTest::testReset PHP Метод

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

public testReset ( )
    public function testReset()
    {
        $curl = $this->getMockBuilder(get_class($this->curl))->getMock();
        $curl->expects($this->once())->method('reset')->with();
        // lets make small request
        $curl->setOpt(CURLOPT_CONNECTTIMEOUT_MS, 2000);
        $curl->get('http://1.2.3.4/');
        $curl->reset();
        $this->assertFalse($curl->error);
        $this->assertSame(0, $curl->error_code);
        $this->assertNull($curl->error_message);
        $this->assertFalse($curl->curl_error);
        $this->assertSame(0, $curl->curl_error_code);
        $this->assertNull($curl->curl_error_message);
        $this->assertFalse($curl->http_error);
        $this->assertSame(0, $curl->http_status_code);
        $this->assertNull($curl->http_error_message);
        $this->assertNull($curl->request_headers);
        $this->assertNull($curl->response_headers);
        $this->assertNull($curl->response);
    }