public function testSetProxyAndTimeout() { $httpCore = new RequestCore("http://www.baidu.com"); $httpCore->set_proxy("1.0.2.1:8888"); $httpCore->connect_timeout = 1; try { $httpResponse = $httpCore->send_request(); $this->assertTrue(false); } catch (RequestCoreException $e) { } }