当前位置: 首页>>代码示例>>PHP>>正文


PHP TextReporter::paintGroupEnd方法代码示例

本文整理汇总了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);
 }
开发者ID:evrard,项目名称:cakephp2x,代码行数:12,代码来源:cake_text_reporter.php

示例2: paintGroupEnd

 function paintGroupEnd($test_name)
 {
     parent::paintGroupEnd($test_name);
 }
开发者ID:knevcher,项目名称:limb,代码行数:4,代码来源:lmbTestShellReporter.class.php

示例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;
    }
开发者ID:joeymetal,项目名称:v1,代码行数:75,代码来源:xmlreporter.php


注:本文中的TextReporter::paintGroupEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。