Unit Test Results: ' . $test . '

'; } public function paintCaseStart($suite) { $this->suite = $case; $this->block = ''; $this->pass = 0; $this->fail = 0; $this->total = 0; } public function paintMethodStart($method) { $this->method = $method; $this->errors = array(); $this->status = true; } public function paintError($error) { $this->errors[] = $error; } public function paintFail($message) { $this->status = false; $this->errors[] = $message; } public function paintPass($message) { } public function paintMethodEnd($method) { if ($this->status) { $this->pass++; $this->_passes++; } else { $this->fail++; $this->_fails++; } $this->block .= "\n\t\t" . '
'; $this->block .= "\n\t\t\t" . '
' . $method . '
'; if (sizeof($this->errors) > 0) { $this->block .= "\n\t\t\t" . '
'; $this->block .= $this->formatInfo($this->errors); $this->block .= "\n\t\t\t" . '
'; } $this->block .= "\n\t\t" . '
'; } private function formatInfo($list) { $output = ''; $count = sizeof($list); foreach ($list AS $err) { $i++; $output .= "\n\t\t\t\t" . '
'; $output .= "\n\t\t\t\t\t" . '
• ' . htmlspecialchars($err) . '
'; $output .= "\n\t\t\t\t" . '
'; } return $output; } public function paintCaseEnd($case) { $total = $this->pass + $this->fail; $successPercent = round(100 * (($total - $this->fail) / $total), 1); $this->html .= '
'; $this->html .= "\n\t" . '
'; $this->html .= "\n\t\t" . '' . $total . ' Tests, ' . $successPercent . '% Success' . ''; $this->html .= "\n\t\t" . $case; $this->html .= "\n\t" . '
'; $this->html .= "\n\t" . '
'; $this->html .= $this->block; $this->html .= "\n\t" . '
'; $this->html .= "\n" . '
'; $this->html .= "\n\n" . '
' . "\n\n"; } public function paintFooter($test) { $total = $this->getPassCount() + $this->getFailCount(); echo '
The following is a report of how each unit test performed. If any errors or exceptions were thrown, they have been recorded below. Tests have been broken down into their test suite groups. Your overall statistics are here:

Total Tests: ' . $total . '
Number Success: ' . $this->getPassCount() . '
Number Fail: ' . $this->getFailCount() . '

Total Success Rate: ' . round(100 * ($this->getPassCount() / $total), 1) . '%

'; echo $this->html; echo ' '; } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>