From 1ccb468914c984b367e18456b5c718d76d5898be Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 23 Sep 2009 15:56:59 -0700 Subject: [PATCH] Add a method to unmock the logger. --- t/lib/WebGUI/Test.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/t/lib/WebGUI/Test.pm b/t/lib/WebGUI/Test.pm index 3cf3c745a..092ab6354 100644 --- a/t/lib/WebGUI/Test.pm +++ b/t/lib/WebGUI/Test.pm @@ -305,6 +305,25 @@ sub interceptLogging { #---------------------------------------------------------------------------- +=head2 restoreLogging + +Restores's the logging object to its original state. + +=cut + +sub restoreLogging { + my $logger = $SESSION->log->getLogger; + + $logger->unmock( 'warn' ) + ->unmock( 'debug' ) + ->unmock( 'info' ) + ->unmock( 'error' ) + ->unmock( 'isDebug' ) + ->unmock( 'is_debug' ); +} + +#---------------------------------------------------------------------------- + =head2 config Returns the config object from the session.