From 1d4810f6b5f97e570a01b500851f493000b286fd Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 30 May 2008 07:03:05 +0000 Subject: [PATCH] migrate some tests from errorHandler to log --- t/Workflow.t | 2 +- t/lib/WebGUI/Test.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/Workflow.t b/t/Workflow.t index 4dfd01c83..47f3e3df4 100644 --- a/t/Workflow.t +++ b/t/Workflow.t @@ -41,7 +41,7 @@ ok(!isIn($wfId, keys %{WebGUI::Workflow->getList($session)}), 'workflow not in e $wf->set({enabled => 1}); ok($wf->get('enabled'), 'workflow is enabled'); ok(isIn($wfId, keys %{WebGUI::Workflow->getList($session)}), 'workflow in enabled list'); -$session->errorHandler->warn('Interesting'); +$session->log->warn('Interesting'); $wf->set({enabled => 0}); ok(!$wf->get('enabled'), 'workflow is disabled again'); diff --git a/t/lib/WebGUI/Test.pm b/t/lib/WebGUI/Test.pm index 5f774e875..a93afa8af 100644 --- a/t/lib/WebGUI/Test.pm +++ b/t/lib/WebGUI/Test.pm @@ -146,7 +146,7 @@ Intercept logging request and capture them in buffer variables for testing =cut sub interceptLogging { - my $logger = $SESSION->errorHandler->getLogger; + my $logger = $SESSION->log->getLogger; $logger = Test::MockObject::Extends->new( $logger ); $logger->mock( 'warn', sub { $WebGUI::Test::logger_warns = $_[1]} ); @@ -314,7 +314,7 @@ sub root { Returns the WebGUI::Session object that was created by the test. This session object will automatically be destroyed if the test finishes without dying. -The errorHandler/logger for this session has been overridden so that you can test +The logger for this session has been overridden so that you can test that WebGUI is logging errors. That means that errors will not be put into your webgui.log file (or whereever log.conf says to put it). This will probably be moved into a utility sub so that the interception can be enabled, and then