public function testFlush()
 {
     $this->outStream->write("Some data");
     $this->outStream->flush();
     $this->outStream->close();
     try {
         $this->outStream->flush();
         $this->fail("Expected IOException when attempting to flush a closed stream.");
     } catch (IOException $ioe) {
         // exception is expected
     }
 }
 public function writingAfterClose()
 {
     with($stream = new FileOutputStream($this->file));
     $stream->close();
     $stream->write('');
 }