Наследование: extends SimpleReporter
Пример #1
0
 function paintCaseEnd($test_name)
 {
     parent::paintCaseEnd($test_name);
     //        print_r($_GET);
     //        print_r($_POST);
     //        print_r($_REQUEST);
 }
Пример #2
0
    /**
     *
     */
    function _getCss()
    {
        $contents = parent::_getCss() . "\n ";
        $contents .= '
	 .bar { float: left; display: inline;  border: 1px solid #eee; width: 300px; white-space: nowrap;}
	.percentage { float: left; background-color: #eef;  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;  font-size: 0.65em;  padding: 5px;  margin-right: }
	.coverage {margin: 0.4em; }
	.coverage a {
		padding-left: 0.5em;
	}
	.coverage:after {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
	}
	.coverage {display: inline-block;}
	/* Hides from IE-mac \\*/
	* html .coverage {height: 1%;}
	.coverage {display: block;}
	/* End hide from IE-mac */
	';
        return $contents;
    }
Пример #3
0
 /**
  * Called when a pass needs to be output.
  */
 function paintPass($message)
 {
     //(Implicitly call grandparent, as parent not implemented.)
     parent::paintPass($message);
     if ($this->showpasses) {
         $this->_paintPassFail('pass', $message);
     }
 }
Пример #4
0
 function _getCss()
 {
     $result = parent::_getCss();
     $result .= "\n.progress { margin: 1px; height: 20px; padding: 1px; border: 1px solid #000; width: 275px; " . "background: #fff; color: #000; float: left; clear: right; top: 75px; z-index: 9; }";
     $result .= "\n.percents { background: #FFF; border: 1px solid #CCC; margin: 1px; height: 20px; " . "position:absolute; width:275px; z-index:10; left: 10px; top: 75px; text-align: center; }";
     $result .= "\n.blocks { background: #EEE; border: 1px solid #CCC; margin: 1px; height: 20px; width: 10px; " . "position: absolute; z-index:11; left: 12px; top: 75px; " . "filter: alpha(opacity=50); -moz-opacity: 0.5; opacity: 0.5; -khtml-opacity: .5 }";
     return $result;
 }
Пример #5
0
 function paintPass($message)
 {
     parent::paintPass($message);
     print "<span class=\"pass\">Pass</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     //print implode("->", $breadcrumb);
     print "&#x2192; {$message}<br />\n";
 }
 function paintPass($message)
 {
     parent::paintPass($message);
     print '<span class="pass">Pass</span>: ';
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     print implode(" -> ", $breadcrumb);
     print " -> {$message}<br />\n";
 }
Пример #7
0
 function paintPass($message)
 {
     parent::paintPass($message);
     $messageWithoutTrace = trim(substr($message, 0, strpos($message, " at [")));
     if (strlen($messageWithoutTrace) == 0) {
         // don't show empty messages (they appear if debugging is conditionally disabled)
         return;
     }
     print "<span class=\"pass\">Pass</span>: ";
     print "{$messageWithoutTrace}<br />\n";
 }
Пример #8
0
    protected function getCss()
    {
        return parent::getCss() . '
			.pass {color:green;}
			.subtle {color:#7B0000;}
			h1 {display:none;}
			h2,h3,h4{font-family:Verdana,Sans-serif;}
			table {margin-bottom:0.5em;width:100%;}
			tr {vertical-align:top;}
			td.first {width:3em;}
		';
    }
Пример #9
0
 function paintGroupEnd($name)
 {
     $matches = array();
     if (preg_match("#ext/(.*)/test.php#", $name, $matches)) {
         $name = $matches[1];
         $link = "<a href=\"" . make_link("test/{$name}") . "\">Test only this extension</a>";
     }
     parent::paintGroupEnd($name);
     if ($this->current_html == "") {
         $this->clear_modules[] = $name;
     } else {
         $this->current_html .= "<p>{$link}";
         $this->page->add_block(new Block($name, $this->current_html, "main", 50));
         $this->current_html = "";
     }
 }
 function _getCss()
 {
     return parent::_getCss() . " .pass { color: green; } \n" . " .fail { font-weight:bold; font-size:1.2em; }.\n";
 }
Пример #11
0
 /**
  *    Does nothing yet. The first output will
  *    be sent on the first test start. For use
  *    by a web browser.
  *    @access public
  */
 function CakeHtmlReporter($character_set = 'ISO-8859-1')
 {
     parent::HtmlReporter($character_set);
 }
 /**
  * Paints the CSS. Add additional styles here.
  * @return string            CSS code as text.
  * @access protected
  */
 function _getCss()
 {
     return HtmlReporter::_getCss() . " pre.source { font-family: monospace; white-space: pre; background-color: #eeeeec; }" . " span.lineNum { background-color: #e9b96e; }" . " span.lineCov { background-color: #8ae234; }" . " span.lineNoCov { background-color: #FAEA4F; }" . " span.lineDeadCode { background-color: #EF7B00; }" . " table#coverage th { background-color: #555752; color: white; text-align: center; padding: 0.1em 1em; }" . " table#coverage td.a { color: black; }" . " table#coverage td.low { background-color: #ef7b00; color: black; text-align: center; padding: 0.1em 1em; }" . " table#coverage td.medium { background-color: #faea4f; color: black; text-align: center; padding: 0.1em 1em; }" . " table#coverage td.high { background-color: #8ee034; color: black; text-align: center; padding: 0.1em 1em; }" . " table#coverage td { background-color: #d4d7d0; color: black; text-align: left; padding: 0.1em 1em; }";
 }
Пример #13
0
#!/usr/bin/php
<?php 
class HtmlReporter
{
    public function run()
    {
        $data = file_get_contents("php://stdin");
        $data = json_decode($data, true);
        echo $this->render("template.view.php", array('profiles' => $data['profiles'], 'meta' => $data['meta'], 'url' => 'https://github.com/makeusabrew/phpperf/'));
    }
    protected function highlight($str)
    {
        return str_replace("&lt;?php&nbsp;", "", highlight_string("<?php " . $str, true));
    }
    protected function microformat($value)
    {
        return $value * 1000000 . " &mu;s";
    }
    protected function render($tpl, $vars)
    {
        foreach ($vars as $k => $v) {
            $this->{$k} = $v;
        }
        ob_start();
        include $tpl;
        return ob_get_clean();
    }
}
$reporter = new HtmlReporter();
$reporter->run();
Пример #14
0
 public function getCss()
 {
     echo 'body { font:14px Consolas; }
           a.tooltip {text-decoration:none;}' . parent::getCss() . ' .pass { color: green; }
            .fail { font-weight: bold; }';
 }
Пример #15
0
 function _getCss()
 {
     return parent::_getCss() . ' .pass { color: blue; }';
 }
Пример #16
0
 public function paintCaseEnd($test_name)
 {
     parent::paintCaseEnd($test_name);
     echo '<hr/><br/><br/></div>';
     flush();
 }
Пример #17
0
 function paintPass($message)
 {
     parent::paintPass($message);
     print "<span class=\"pass\">Pass</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     print implode(" -&gt; ", $breadcrumb);
     print " -&gt; " . htmlentities($message) . "<br />\n";
 }
Пример #18
0
 function __construct($character_set = 'UTF-8')
 {
     parent::HtmlReporter($character_set);
 }
Пример #19
0
 function paintException($exception)
 {
     parent::paintException($exception);
     echo '<pre>' . $exception->getTraceAsString() . '</pre>';
 }
Пример #20
0
 /**
  *    Does nothing yet. The first output will
  *    be sent on the first test start. For use
  *    by a web browser.
  *    @access public
  */
 function CakeHtmlReporter($characterSet = 'UTF-8')
 {
     parent::HtmlReporter($characterSet);
 }
Пример #21
0
 /**
  * Display the start of each test case
  *
  * @param string $test_case
  * @param int $size
  */
 function paintGroupStart($test_case, $size)
 {
     parent::paintGroupStart($test_case, $size);
     print "<br /><div class=\"group\"><b>Test Case:</b> {$test_case}</div>";
 }
Пример #22
0
 function _getCss()
 {
     return parent::_getCss() . ' body { font-family: Consolas, monospace; } [lang="he"] { unicode-bidi: embed; font-family: "SBL Hebrew", "Narkisim" }';
 }
Пример #23
0
 function paintFail($message)
 {
     static $header = FALSE;
     if (!$header) {
         $this->newPaintHeader();
         $header = TRUE;
     }
     parent::paintFail($message);
 }
Пример #24
0
 protected function getCss()
 {
     return parent::getCss() . ' .pass { color: green; }';
 }
Пример #25
0
 function paintMethodEnd($test_name)
 {
     //while(ob_get_status())
     //	ob_end_clean();
     parent::paintMethodEnd($test_name);
 }
Пример #26
0
 function paintPass($message)
 {
     parent::paintPass($message);
     print "<span class=\"pass\">Pass</span>: ";
     print " {$message}<br />\n";
 }
Пример #27
0
 protected function getCss()
 {
     $r = file_get_contents(dirname(__FILE__) . '/../../../resources/css/private.css');
     return parent::getCss() . " .pass { color: green; }\n" . $r;
 }
Пример #28
0
 public function paintPass($message)
 {
     parent::paintPass($message);
     print '<span class="pass">Pass</span>: ';
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     print implode(' -&gt; ', $breadcrumb);
     print ' -&gt; ' . htmlentities($message) . "<br />\n";
 }
Пример #29
0
 function _getCss()
 {
     return parent::_getCss() . ' .pass { color: green; }';
 }
Пример #30
0
 public function getCss()
 {
     return parent::getCss() . ' .pass { color: green; } ';
 }