HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/test/MDB/tests/HTML_TestListener.php
<?php

class HTML_TestListener extends PHPUnit_TestListener {
    function addError(&$test, &$t) {
        $this->_errors += 1;
        echo("<div class=\"error\"> Error $this->_errors in ".$test->getName()." : $t</div>");
    }

    function addFailure(&$test, &$t) {
        $this->_fails += 1;
        if ($this->_fails == 1) {
            echo("\n<div class=\"failure\">");
        }
        echo("Failure $this->_fails : $t<br>\n");
    }

    function endTest(&$test) {
        if ($this->_fails == 0 && $this->_errors == 0) {
            echo(' Test passed');
        } else {
            echo("There were $this->_fails failures for ".$test->getName()."</br>\n");
            echo("There were $this->_errors errors for ".$test->getName()."</div>\n");
        }
        echo('</div>');
    }

    function startTest(&$test) {
        $this->_fails = 0;
        $this->_errors = 0;
        echo("\n<div class=\"testcase\">".get_class($test).' : Starting '.$test->getName().' ...');
    }
}

?>