PHPUnit_Util_Printer::flush PHP Method

flush() public method

Flush buffer, optionally tidy up HTML, and close output.
public flush ( )
    public function flush()
    {
        if ($this->out && $this->outTarget !== 'php://stderr') {
            fclose($this->out);
        }
        if ($this->printsHTML === TRUE && $this->outTarget !== NULL && strpos($this->outTarget, 'php://') !== 0 && strpos($this->outTarget, 'socket://') !== 0 && extension_loaded('tidy')) {
            file_put_contents($this->outTarget, tidy_repair_file($this->outTarget, array('indent' => TRUE, 'wrap' => 0), 'utf8'));
        }
    }

Usage Example

 public function flush()
 {
     if (!$this->rootTestSuiteWrote) {
         $emptyTestSuite = new \PHPUnit_Framework_TestSuite();
         $this->startTestSuite($emptyTestSuite);
         $this->endTestSuite($emptyTestSuite);
     }
     $this->junitXMLWriter->endTestSuites();
     parent::flush();
 }
All Usage Examples Of PHPUnit_Util_Printer::flush