migrate some tests from errorHandler to log

This commit is contained in:
Colin Kuskie 2008-05-30 07:03:05 +00:00
parent f41d53aa90
commit 1d4810f6b5
2 changed files with 3 additions and 3 deletions

View file

@ -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');

View file

@ -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