本文整理汇总了PHP中TextReporter::paintGroupEnd方法的典型用法代码示例。如果您正苦于以下问题:PHP TextReporter::paintGroupEnd方法的具体用法?PHP TextReporter::paintGroupEnd怎么用?PHP TextReporter::paintGroupEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextReporter
的用法示例。
在下文中一共展示了TextReporter::paintGroupEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paintGroupEnd
/**
* Signals/Paints the end of a TestSuite. All test cases have run
* and timers are stopped.
*
* @return void
*/
function paintGroupEnd($test_name)
{
$this->_timeEnd = $this->_getTime();
$this->_timeDuration = $this->_timeEnd - $this->_timeStart;
parent::paintGroupEnd($test_name);
}
示例2: paintGroupEnd
function paintGroupEnd($test_name)
{
parent::paintGroupEnd($test_name);
}
示例3: paintGroupEnd
/**
* Paints the end of a group test. Will paint the page
* footer if the stack of tests has unwound.
* @param string $test_name Name of test that is ending.
* @param integer $progress Number of test cases ending.
* @access public
*/
function paintGroupEnd($test_name) {
parent::paintGroupEnd($test_name);
$this->group_depth--;
if ($this->group_depth==0) {
//$contents = ob_get_contents();
//ob_end_clean();
$phpversion='php5';
$backend="mysql";
$this->_outstring='<?xml version="1.0" encoding="'.$this->_character_set.'"?>
<testsuites php-version="'.$this->phpversion.'" backend="'.$this->backend.'">';
//foreach ($this->output as $level=>$out) {
$this->_outstring.=implode("\n",$this->output);
//}
$this->_outstring.='</testsuites>';
unset($this->output);
$this->output=array();
unset($this->_out);
$this->_out=array();
} else if ($this->group_depth==1) {
$time = time()+microtime(true) - $this->_starttime;
//$contents = ob_get_contents();
//ob_end_clean();
$out="";
//package="'.$this->suiteName.'"
$out.='<testsuite name="'.$this->suiteName.'" package="'.$this->suiteName.'" file="'.$this->fileName.'" tests="'.$this->_sizes[$this->suiteName].'" failures="'.(isset($this->_failCounts[$this->suiteName])?$this->_failCounts[$this->suiteName]:0).'" errors="'.(isset($this->_exceptionCounts[$this->suiteName])?$this->_exceptionCounts[$this->suiteName]:0).'" time="'.$time.'">';
if (isset($this->_out[$this->group_depth]) && is_array($this->_out[$this->group_depth])) {
foreach ($this->_out[$this->group_depth] as $level=>$string) {
$out.=$string;
}
}
$out.="</testsuite>";
$this->_out[$this->group_depth] = array();
$this->output[]=$out;
} else if($this->group_depth==3) {
//$contents = ob_get_contents();
//ob_end_clean();
$time = time()+microtime(true) - $this->_startsubtime;
$out = "";
$out.='<testsuite name="'.$this->suiteName.'::'.basename($this->testFileName).'" file="'.$this->testFileName.'" package="'.$this->suiteName.'" tests="'.(isset($this->_sizes[$this->testFileName])?$this->_sizes[$this->testFileName]:0).'" failures="'.(isset($this->_failCounts[$this->testFileName])?$this->_failCounts[$this->testFileName]:0).'" errors="'.(isset($this->_exceptionCounts[$this->testFileName])?$this->_exceptionCounts[$this->testFileName]:0).'" time="'.$time.'">';
if (isset($this->_out[$this->group_depth+1]) && is_array($this->_out[$this->group_depth+1]) && count($this->_out[$this->group_depth+1])>0) {
foreach ($this->_out[$this->group_depth+1] as $level=>$string) {
$out.=$string;
}
} else {
if (@$this->_failCounts[$this->suiteName]+@$this->_exceptionCounts[$this->suiteName]>0) {
for($i=0;$i<@$this->_failCounts[$this->suiteName]+@$this->_exceptionCounts[$this->suiteName];$i++) {
$message = @array_shift($this->fail_messages);
if($message!=null) {
$out.='<error>';
$out.="<![CDATA[";
$out.=$message;
$out.="]]>";
$out.='</error>';
}
}
}
}
$out.="</testsuite>";
if (!isset($this->_out[1])) {
$this->_out[1] = array();
}
$this->_out[1][]=$out;
$this->_out[$this->group_depth+1] = array();
}
//$this->_fails = 0;
//$this->_passes = 0;
}