本文整理汇总了PHP中PHPUnit_Util_Printer::flush方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Util_Printer::flush方法的具体用法?PHP PHPUnit_Util_Printer::flush怎么用?PHP PHPUnit_Util_Printer::flush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Util_Printer
的用法示例。
在下文中一共展示了PHPUnit_Util_Printer::flush方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flush
public function flush()
{
if (!$this->rootTestSuiteWrote) {
$emptyTestSuite = new \PHPUnit_Framework_TestSuite();
$this->startTestSuite($emptyTestSuite);
$this->endTestSuite($emptyTestSuite);
}
$this->junitXMLWriter->endTestSuites();
parent::flush();
}
示例2: flush
/**
* Flush buffer and close output.
*/
public function flush()
{
$this->doEndClass();
$this->endRun();
parent::flush();
}
示例3: flush
/**
* Flush buffer and close output.
*
* @access public
*/
public function flush()
{
$this->write($this->graph->parse());
parent::flush();
}
示例4: flush
/**
* Flush buffer and close output.
*/
public function flush()
{
if ($this->writeDocument === true) {
$this->write($this->getXML());
}
parent::flush();
}
示例5: flush
/**
* 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: flush
/**
* @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: flush
/**
* Flush buffer and close output.
*/
public function flush()
{
$this->write($this->document->saveXML());
parent::flush();
}
示例8: flush
public function flush()
{
$this->junitXMLWriter->endTestSuites();
parent::flush();
}
示例9: flush
public function flush()
{
parent::flush();
$this->saveCheckstyleReport();
$this->printOutputReport();
}
示例10: flush
public function flush()
{
$this->xmlWriter->endTestSuites();
parent::flush();
}