芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp80/includes/test/HTML_Progress/tests/HTML_TestListener.php
* @package HTML_Progress * @ignore */ class HTML_TestListener extends PHPUnit_TestListener { function HTML_TestListener() { $report = <<
Class
Function
Success
Meta-result
HDR; echo $report; } function addError(&$test, &$t) { $this->_errors += 1; } function addFailure(&$test, &$t) { $this->_fails += 1; } function endTest(&$test) { /* Report both the test result and, for this special situation where some tests are expected to fail, a "meta" test result which indicates whether the test result matches the expected result. */ $expect_failure = preg_match('/fail/i', $test->getName()); $test_passed = ($this->_fails == 0 && $this->_errors == 0); if ($this->_errors > 0) { $outcome = "
ERROR
"; } else if ($this->_fails > 0) { $outcome = "
FAIL
"; } else { $outcome = "
OK
"; } if ($this->_errors > 0) { $meta_outcome = '
unknown
'; } else { $meta_outcome = ($expect_failure xor $test_passed) ? '
as expected
' : '
UNEXPECTED
'; } printf("
$outcome
$meta_outcome
"); } function startTest(&$test) { $this->_fails = 0; $this->_errors = 0; printf("
%s
%s
", get_class($test), $test->getName()); } } ?>