console_testlistener.php
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 32 行
PHP
32 行
<?phpclass Console_TestListener extends PHPUnit_TestListener { function addError(&$test, &$t) { $this->_errors += 1; echo " Error $this->_errors in " . $test->getName() . " : $t\n"; } function addFailure(&$test, &$t) { $this->_fails += 1; if ($this->_fails == 1) { echo "\n"; } echo "Failure $this->_fails : $t\n"; } function endTest(&$test) { if ($this->_fails == 0 && $this->_errors == 0) { echo ' Test passed'; } else { echo "There were $this->_fails failures for " . $test->getName() . "\n"; echo "There were $this->_errors errors for " . $test->getName() . "\n"; } echo "\n"; } function startTest(&$test) { $this->_fails = 0; $this->_errors = 0; echo get_class($test) . " : Starting " . $test->getName() . " ..."; }}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?