Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
use strict; | ||
use warnings FATAL => 'all'; | ||
|
||
use Test::More; | ||
|
||
use CGI::Application::Plugin::DevPopup::Log (); | ||
eval "use Log::Dispatch::Handle"; | ||
plan skip_all => "Log::Dispatch::Handle required for this test" if $@; | ||
eval "use Test::NoWarnings"; | ||
plan skip_all => "Test::NoWarnings required for this test" if $@; | ||
plan tests => 2; | ||
|
||
my $log = bless {}, 'CGI::Application::Plugin::DevPopup::Log'; | ||
|
||
like eval | ||
{ | ||
my $fh = $log->devpopup_log_handle; | ||
my $handle = Log::Dispatch::Handle->new( | ||
name => 'test RT53100', | ||
min_level => 'debug', | ||
handle => $fh, | ||
); | ||
$handle->log(level => "debug", message => "we live!"); | ||
|
||
my $report = $log->_log_report; | ||
}, qr/we live!/, "no fatal warnings"; | ||
|
||
__END__ | ||
1..2 | ||
ok 1 - no fatal warnings | ||
ok 2 - no warnings |