public function testWriteAndRead()
{
$stream = new Stream($this->_testConfig);
$result = $stream->open();
$data = "GET / HTTP/1.1\r\n";
$data .= "Host: localhost\r\n";
$data .= "Connection: Close\r\n\r\n";
$this->assertTrue($stream->write($data));
$result = $stream->eof();
$this->assertFalse($result);
$result = $stream->read();
$this->assertPattern("/^HTTP/", $result);
}