Rewrite continued:
[core.git] / application / tests / exceptions.php
index 7248c82c472815af3aadcddd9fc1707af648e611..ed824148ec45a4bd92b721e3b9400718d7f113fe 100644 (file)
@@ -89,7 +89,7 @@ Backtrace:
                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
@@ -101,7 +101,7 @@ Backtrace:
 }
 
 // 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),
@@ -115,7 +115,7 @@ function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext)
 } // END - function
 
 // Assertion handler
-function __assertHandler ($file, $line, $code) {
+function test_assert_handler ($file, $line, $code) {
        // Empty code?
        if ($code === '') {
                $code = '<em>Unknown</em>';
@@ -136,14 +136,14 @@ function __assertHandler ($file, $line, $code) {
 } // 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');