本文整理匯總了PHP中TextReporter::paintFooter方法的典型用法代碼示例。如果您正苦於以下問題:PHP TextReporter::paintFooter方法的具體用法?PHP TextReporter::paintFooter怎麽用?PHP TextReporter::paintFooter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TextReporter
的用法示例。
在下文中一共展示了TextReporter::paintFooter方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: paintFooter
/**
* Paints the end of the test with a summary of
* the passes and failures.
*
* @param string $test_name Name class of test.
* @access public
*/
function paintFooter($test_name)
{
parent::paintFooter($test_name);
echo 'Time taken by tests (in seconds): ' . $this->_timeDuration . "\n";
if (function_exists('memory_get_peak_usage')) {
echo 'Peak memory use: (in bytes): ' . number_format(memory_get_peak_usage()) . "\n";
}
}
示例2: paintFooter
function paintFooter($test_name)
{
parent::paintFooter($test_name);
$runner = lmbTestRunner::getCurrent();
print 'Tests time: ' . $runner->getRuntime() . " sec.\n";
if ($memory = $runner->getMemoryUsage()) {
print 'Tests memory usage: ' . $memory . " Mb.\n";
}
if ($this->failed_tests) {
print "=========== FAILED TESTS ===========\n";
print implode("\n", $this->failed_tests) . "\n";
}
}
示例3: paintFooter
/**
* Capture the attempt to display the final test results and insert the
* ANSI-color codes in place.
*
* @param string
* @see TextReporter
* @access public
*/
function paintFooter($test_name)
{
ob_start();
parent::paintFooter($test_name);
$output = trim(ob_get_clean());
if ($output) {
if ($this->getFailCount() + $this->getExceptionCount() == 0) {
$color = $this->_passColor;
} else {
$color = $this->_failColor;
}
$this->_setColor($color);
echo $output;
$this->_resetColor();
}
}
示例4: paintFooter
public function paintFooter($test_name)
{
parent::paintFooter($test_name);
echo 'Time: ' . $GLOBALS['TIME'] . "\n";
}
示例5: paintFooter
function paintFooter($test_name) {
parent::paintFooter($test_name);
}