Fix how logging gets intercepted. It used to be on by default, now it must be turned on.
This commit is contained in:
parent
78776f2f33
commit
06f52bae9a
6 changed files with 29 additions and 7 deletions
|
|
@ -116,6 +116,8 @@ $session->user({userId => 1}); ##back to Visitor
|
|||
my $wgBdayMail = 'Thu, 16 Aug 2001 08:00:00 -0500';
|
||||
is ($dt->mailToEpoch($wgBdayMail), $wgbday, 'mailToEpoch');
|
||||
|
||||
WebGUI::Test->interceptLogging();
|
||||
|
||||
is ($dt->mailToEpoch(750), undef, 'mailToEpoch returns undef on failure to parse');
|
||||
like($WebGUI::Test::logger_warns, qr{750 is not a valid date for email}, "DateTime logs a warning on failure to parse");
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ my ($eh) = $session->quick('errorHandler');
|
|||
#
|
||||
####################################################
|
||||
|
||||
WebGUI::Test->interceptLogging();
|
||||
|
||||
my $accumulated_warn = "";
|
||||
$eh->warn("This is a warning");
|
||||
is($WebGUI::Test::logger_warns, "This is a warning", "warn: Log4perl called");
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ is($stow->get("Test2"), undef, "deleteAll()");
|
|||
$session->config->set('disableCache', 1);
|
||||
is($stow->get('Test2'), undef, 'get: when config->disableCache is set get returns undef');
|
||||
|
||||
WebGUI::Test->interceptLogging();
|
||||
|
||||
$stow->set('unavailableVariable', 'too bad');
|
||||
is($WebGUI::Test::logger_debug, 'Stow->set() is being called but cache has been disabled', 'debug emitted by set when disableCache is true');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue