flush() public method

Flush buffer, optionally tidy up HTML, and close output.
public flush ( )
コード例 #1
0
 public function flush()
 {
     if (!$this->rootTestSuiteWrote) {
         $emptyTestSuite = new \PHPUnit_Framework_TestSuite();
         $this->startTestSuite($emptyTestSuite);
         $this->endTestSuite($emptyTestSuite);
     }
     $this->junitXMLWriter->endTestSuites();
     parent::flush();
 }
コード例 #2
0
ファイル: ResultPrinter.php プロジェクト: luchaninov/phpunit
 /**
  * Flush buffer and close output.
  */
 public function flush()
 {
     $this->doEndClass();
     $this->endRun();
     parent::flush();
 }
コード例 #3
0
ファイル: GraphViz.php プロジェクト: dalinhuang/shopexts
 /**
  * Flush buffer and close output.
  *
  * @access public
  */
 public function flush()
 {
     $this->write($this->graph->parse());
     parent::flush();
 }
コード例 #4
0
ファイル: JUnit.php プロジェクト: ronaldbao/phpunit
 /**
  * Flush buffer and close output.
  */
 public function flush()
 {
     if ($this->writeDocument === true) {
         $this->write($this->getXML());
     }
     parent::flush();
 }
コード例 #5
0
 /**
  * Flush: Copy images and additional files to folder and generate index file using a template
  *
  * This method is called once after all tests have been processed.
  * HINT: The flush method is only called if the TestListener inherits from PHPUnit_Util_Printer
  *
  * @param array $templateVars
  * @return void
  * @author Fabrizio Branca
  */
 public function flush(array $templateVars = array())
 {
     $this->copyAdditionalFiles();
     $className = $this->viewClass;
     $view = new $className($this->templateFile);
     /* @var $view Menta_Util_View  */
     if (!$view instanceof Menta_Util_View) {
         throw new Exception('View must inherit from Menta_Util_View.');
     }
     foreach ($templateVars as $key => $value) {
         $view->assign($key, $value);
     }
     $this->write($view->render());
     return parent::flush();
 }
コード例 #6
0
ファイル: EarlReportGenerator.php プロジェクト: janul/JsonLD
 /**
  * @inheritdoc
  */
 public function flush()
 {
     if (0 === $this->assertions) {
         return;
     }
     $report = array('@context' => array('doap' => 'http://usefulinc.com/ns/doap#', 'foaf' => 'http://xmlns.com/foaf/0.1/', 'dc' => 'http://purl.org/dc/terms/', 'earl' => 'http://www.w3.org/ns/earl#', 'xsd' => 'http://www.w3.org/2001/XMLSchema#', 'doap:homepage' => array('@type' => '@id'), 'doap:license' => array('@type' => '@id'), 'dc:creator' => array('@type' => '@id'), 'foaf:homepage' => array('@type' => '@id'), 'subjectOf' => array('@reverse' => 'earl:subject'), 'earl:assertedBy' => array('@type' => '@id'), 'earl:mode' => array('@type' => '@id'), 'earl:test' => array('@type' => '@id'), 'earl:outcome' => array('@type' => '@id'), 'dc:date' => array('@type' => 'xsd:date')), '@id' => $this->options['project-url'], '@type' => array('doap:Project', 'earl:TestSubject', 'earl:Software'), 'doap:name' => $this->options['project-name'], 'dc:title' => $this->options['project-name'], 'doap:homepage' => $this->options['project-homepage'], 'doap:license' => $this->options['license-url'], 'doap:description' => $this->options['project-description'], 'doap:programming-language' => $this->options['programming-language'], 'doap:developer' => array('@id' => $this->options['developer-url'], '@type' => array('foaf:Person', 'earl:Assertor'), 'foaf:name' => $this->options['developer-name'], 'foaf:homepage' => $this->options['developer-homepage']), 'dc:creator' => $this->options['developer-url'], 'dc:date' => array('@value' => date('Y-m-d'), '@type' => 'xsd:date'), 'subjectOf' => $this->assertions);
     $options = 0;
     if (PHP_VERSION_ID >= 50400) {
         $options |= JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT;
         $report = json_encode($report, $options);
     } else {
         $report = json_encode($report);
         $report = str_replace('\\/', '/', $report);
         // unescape slahes
         // unescape unicode
         $report = preg_replace_callback('/\\\\u([a-f0-9]{4})/', function ($match) {
             return iconv('UCS-4LE', 'UTF-8', pack('V', hexdec($match[1])));
         }, $report);
     }
     $this->write($report);
     parent::flush();
 }
コード例 #7
0
ファイル: XML.php プロジェクト: thanghexp/project
 /**
  * Flush buffer and close output.
  */
 public function flush()
 {
     $this->write($this->document->saveXML());
     parent::flush();
 }
コード例 #8
0
 public function flush()
 {
     $this->junitXMLWriter->endTestSuites();
     parent::flush();
 }
 public function flush()
 {
     parent::flush();
     $this->saveCheckstyleReport();
     $this->printOutputReport();
 }
コード例 #10
0
ファイル: JUnitXMLPrinter.php プロジェクト: rsky/makegood
 public function flush()
 {
     $this->xmlWriter->endTestSuites();
     parent::flush();
 }