File: RT53100.t

package info (click to toggle)
libcgi-application-plugin-devpopup-perl 1.07-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 292 kB
  • sloc: perl: 481; sh: 56; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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