printFooter() protected method

protected printFooter ( PHPUnit_Framework_TestResult $result )
$result PHPUnit_Framework_TestResult
 /**
  * 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();
 }
Esempio n. 2
0
 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>');
 }
Esempio n. 3
0
 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();
 }
 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());
     }
 }