public function close()
{
if (!is_resource($this->_resource)) {
return true;
}
curl_close($this->_resource);
if (is_resource($this->_resource)) {
$this->close();
}
return true;
}
public function testClose() { $stream = new Curl($this->_testConfig); $result = $stream->open(); $this->assertTrue($result); $result = $stream->close(); $this->assertTrue($result); $result = $stream->resource(); $this->assertFalse(is_resource($result)); }