diff options
author | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
commit | 3446a75a36964410413bd57f756120f1868fc463 (patch) | |
tree | 6d2a96700b472f931c29b8dc5075130b1935e669 /pear/tests/PEAR_ErrorStack/TestUnit.php | |
parent | 5bb29235dcf14be317f07d389b5be2f2c5318950 (diff) | |
download | php-git-3446a75a36964410413bd57f756120f1868fc463.tar.gz |
remove unused obsolete files from pear CVS
# to run PEAR tests, grab pear-core/tests and use "pear run-tests -rq"
Diffstat (limited to 'pear/tests/PEAR_ErrorStack/TestUnit.php')
-rw-r--r-- | pear/tests/PEAR_ErrorStack/TestUnit.php | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/pear/tests/PEAR_ErrorStack/TestUnit.php b/pear/tests/PEAR_ErrorStack/TestUnit.php deleted file mode 100644 index 1fe703f664..0000000000 --- a/pear/tests/PEAR_ErrorStack/TestUnit.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/** - * TestUnit runs a TestSuite and returns a TestResult object. - * And more than PHPUnit attach a listener to TestResult. - * - * @version $Id$ - * @author Laurent Laville <pear@laurent-laville.org> - * @package HTML_CSS - */ - -require_once 'PHPUnit.php'; - -class TestUnit extends PHPUnit { - - function &run(&$suite, $listener) { - $result = new TestResult(); - $result->addListener($listener); - $suite->run($result); - - return $result; - } -} - -class TestResult extends PHPUnit_TestResult { - - /* report result of test run */ - function report() { - echo "</TABLE>"; - - $nRun = $this->runCount(); - $nErrors = $this->errorCount(); - $nFailures = $this->failureCount(); - echo "<h2>Summary</h2>"; - - printf("<p>%s test%s run.<br>", $nRun, ($nRun > 1) ? 's' : ''); - printf("%s error%s.<br>\n", $nErrors, ($nErrors > 1) ? 's' : ''); - printf("%s failure%s.<br>\n", $nFailures, ($nFailures > 1) ? 's' : ''); - if ($nFailures > 0) { - echo "<h2>Failure Details</h2>"; - print("<ol>\n"); - $failures = $this->failures(); - while (list($i, $failure) = each($failures)) { - $failedTest = $failure->failedTest(); - printf("<li>%s\n", $failedTest->getName() ); - print("<ul>"); - printf("<li>%s\n", $failure->thrownException() ); - print("</ul>"); - } - print("</ol>\n"); - } - } - -} -?> |