public static function debugMode($handler = true) { DB::$success_handler = $handler; }
function test_3_debugmode_handler() { global $debug_callback_worked; DB::debugMode('my_debug_handler'); DB::query("SELECT * FROM accounts WHERE username!=%s", "Charlie's Friend"); $this->assert($debug_callback_worked === 1); DB::debugMode(false); }