Log-Mini/t/05_Integration.t

28 lines
877 B
Perl
Raw Normal View History

use lib 'lib';
use strict;
use warnings;
use Test::More;
use Test::Fatal;
use File::Temp;
use Log::Mini;
2023-03-17 18:29:38 +03:00
subtest 'creates correct object Logger::FILE' => sub {
my $file = File::Temp->new;
2023-03-17 18:29:38 +03:00
isa_ok(Log::Mini->new(file => $file->filename), 'Log::Mini::Logger::FILE');
isa_ok(Log::Mini::Logger::FILE->new(file => $file->filename), 'Log::Mini::Logger::FILE');
};
subtest 'creates correct object Logger::STDERR' => sub {
isa_ok(Log::Mini->new('stderr', level => 'debug'), 'Log::Mini::Logger::STDERR');
isa_ok(Log::Mini::Logger::STDERR->new(level => 'debug'), 'Log::Mini::Logger::STDERR');
};
2023-03-17 18:29:38 +03:00
subtest 'creates correct object Logger::NULL' => sub {
isa_ok(Log::Mini->new('null', level => 'debug'), 'Log::Mini::Logger::NULL');
isa_ok(Log::Mini::Logger::NULL->new(level => 'debug'), 'Log::Mini::Logger::NULL');
};
2023-03-17 18:29:38 +03:00
done_testing;