print($message);
} elseif (is_object($exceptionInstance)) {
// Output more details
- printf('exceptionInstance=%s', print_r($exceptionInstance, TRUE));
+ printf('exceptionInstance=%s', print_r($exceptionInstance, true));
} else {
/*
* Invalid exception instance detected! Do *only* throw exceptions that
}
// Error handler
-function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) {
+function test_error_handler ($errno, $errstr, $errfile, $errline, array $errcontext) {
// Construct the message
$message = sprintf('File: %s, Line: %s, Code: %s, Message: %s',
basename($errfile),
} // END - function
// Assertion handler
-function __assertHandler ($file, $line, $code) {
+function test_assert_handler ($file, $line, $code) {
// Empty code?
if ($code === '') {
$code = '<em>Unknown</em>';
} // END - function
// Set error handler
-//set_error_handler('__errorHandler');
+//set_error_handler('test_error_handler');
// Set the new handler
set_exception_handler('tests_exception_handler');
// Init assert handling
-assert_options(ASSERT_ACTIVE , TRUE);
-assert_options(ASSERT_WARNING , FALSE);
-assert_options(ASSERT_BAIL , TRUE);
-assert_options(ASSERT_QUIET_EVAL, FALSE);
-assert_options(ASSERT_CALLBACK , '__assertHandler');
+assert_options(ASSERT_ACTIVE , true);
+assert_options(ASSERT_WARNING , false);
+assert_options(ASSERT_BAIL , true);
+assert_options(ASSERT_QUIET_EVAL, false);
+assert_options(ASSERT_CALLBACK , 'test_assert_handler');