File: default-adapter-env.t

package info (click to toggle)
liblog-any-perl 1.717-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 1,499; makefile: 11
file content (15 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;
use Test::More tests => 4;

BEGIN { $ENV{LOG_ANY_DEFAULT_ADAPTER} = 'Test'; }

use Log::Any '$log';

isa_ok( $log, 'Log::Any::Proxy', 'we have a proxy...' );
ok( !$log->isa('Log::Any::Proxy::Null'), '...but it\'s not the null proxy' );

isa_ok( $log->adapter, 'Log::Any::Adapter::Test', 'correct adapter set' );
$log->err("this is an error");
$log->adapter->contains_ok( qr/this is an error/,
    'adapter got error string' );