當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。