Source for file testUtils.php
Documentation is available at testUtils.php
/* Some utility functions for the test scripts */
* this is used (with array filter) to filter out the test*
* methods from a PHPUnit testcase
* given a class name it returns an array of test* methods
* @param $class text classname
* @return array of methods beginning with test
* Little helper function that outputs check for boxes with suitable names
return " <input type=\"checkbox\" name=\"testmethods[$testcase][$testmethod]\" value=\"1\">$testmethod <br>\n";
* Little helper function that gets a backtrace if available
$message.= 'function debug_backtrace does not exists'. "\n";
$message.= 'Debug backtrace:'. "\n";
foreach ($debug_backtrace as $trace_item) {
$message.= basename($trace_item['file']) . ':' . $trace_item['line'];
$message.= '- PHP inner-code - ';
$message.= $trace_item['class'] . $trace_item['type'];
$message.= $trace_item['function'];
if (!empty ($trace_item['args']) && is_array($trace_item['args'])) {
foreach ($trace_item['args'] as $arg) {
$message.= '('. implode(', ', $args). ')';
$message = "-- PEAR-Error --\n";
$message.= $error_obj->getMessage (). ': '. $error_obj->getUserinfo (). "\n";
PEAR ::setErrorHandling (PEAR_ERROR_CALLBACK , 'errorHandlerPEAR');
$GLOBALS['_show_silenced'] = false;
if ((!$GLOBALS['_show_silenced'] && !error_reporting()) || $errno == 2048 ) {
$message.= " FATAL [$errno] $errstr\n";
$message.= " Fatal error in line $errline of file $errfile";
$message.= ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n";
$message.= "Aborting...\n";
$message.= " ERROR [$errno] $errstr in line $errline of file $errfile\n";
$message.= " WARNING [$errno] $errstr in line $errline of file $errfile\n";
$message.= " Unkown error type: [$errno] $errstr in line $errline of file $errfile\n";
Documentation generated on Wed, 21 Feb 2007 08:00:25 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.
|