本文整理汇总了PHP中PHPUnit_TextUI_ResultPrinter::printFooter方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_TextUI_ResultPrinter::printFooter方法的具体用法?PHP PHPUnit_TextUI_ResultPrinter::printFooter怎么用?PHP PHPUnit_TextUI_ResultPrinter::printFooter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_TextUI_ResultPrinter
的用法示例。
在下文中一共展示了PHPUnit_TextUI_ResultPrinter::printFooter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printFooter
/**
* Just add to the output the seed used to randomize the test suite.
*
* @param PHPUnit_Framework_TestResult $result
*/
protected function printFooter(\PHPUnit_Framework_TestResult $result)
{
parent::printFooter($result);
$this->writeNewLine();
$this->write("Randomized with seed: {$this->seed}");
$this->writeNewLine();
}
示例2: printFooter
protected function printFooter(PHPUnit_Framework_TestResult $result)
{
$this->write('<div class="stats">');
parent::printFooter($result);
$this->write('</div>');
$this->write('<div class="resourceUsage">');
$this->write(PHP_Timer::resourceUsage());
$this->write('</div>');
}
示例3: printFooter
protected function printFooter(\PHPUnit_Framework_TestResult $result)
{
$this->write('<span class="result">');
parent::printFooter($result);
$this->write('</span>');
$this->write('<table class="timer">');
$this->write('<tr><th class="title" colspan="2">Long running tests</th></tr>');
$this->write('<tr><th>Test</th><th>Time</th></tr>');
foreach (Timer::getLongRunningTests(10) as $testName => $timeTaken) {
$timeTaken = round($timeTaken, 2) . 's';
$this->write("<tr><td>{$testName}</td><td>{$timeTaken}</td></td>");
}
$this->write('</table>');
$this->incrementalFlush();
}
示例4: printResult
public function printResult(\PHPUnit_Framework_TestResult $result)
{
// Standard output
parent::printResult($result);
// Capture footer and send to Growl.
$this->capture = true;
parent::printFooter($result);
$this->capture = false;
if (strstr($this->color, 'red')) {
$type = "RED";
} elseif (strstr($this->color, 'green')) {
$type = "GREEN";
} else {
$type = "YELLOW";
}
try {
$this->sendNotify($this->buffer, $type);
} catch (\Exception $e) {
$this->write("[growlprinter] Could not send notification.\n" . $e->getMessage());
}
}