public function read()
{
if (!is_resource($this->_resource)) {
return false;
}
return curl_exec($this->_resource);
}
public function testWriteAndRead() { $stream = new Curl($this->_testConfig); $this->assertTrue(is_resource($stream->open())); $this->assertTrue(is_resource($stream->resource())); $this->assertEqual(1, $stream->write()); $this->assertPattern("/^HTTP/", (string) $stream->read()); }