Webmozart\Console\IO\OutputStream\BufferedOutputStream::flush PHP Method

flush() public method

public flush ( )
    public function flush()
    {
        if ($this->closed) {
            throw new IOException('Cannot read from a closed input.');
        }
    }

Usage Example

 /**
  * @expectedException \Webmozart\Console\Api\IO\IOException
  */
 public function testFlushFailsAfterClose()
 {
     $stream = new BufferedOutputStream();
     $stream->close();
     $stream->flush();
 }