From 005d86c60030a5671450266e251a483de1c3c2c0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 27 Dec 2012 15:37:44 +0100 Subject: [PATCH] Bug 8190: FIX Unit test Set the KOHA_LOG environment variable in the test Signed-off-by: Kyle M Hall --- t/Logger.t | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/t/Logger.t b/t/Logger.t index bff7733..1e42180 100644 --- a/t/Logger.t +++ b/t/Logger.t @@ -2,16 +2,14 @@ use utf8; use Modern::Perl; -if ( not $ENV{KOHA_LOG} ) { - usage(); - exit; -} use Test::More; require C4::Context; import C4::Context; plan tests => 15; +$ENV{KOHA_LOG} = q{/tmp/logger.log}; + my $logfile = $ENV{KOHA_LOG}; use_ok('Koha::Utils::Logger'); @@ -87,9 +85,3 @@ sub test_calledby { $log->error($msg); } -sub usage { - warn "\n\n+=======================================================+\n"; - warn qq{| You must call this test with a KOHA_LOG env var like: |\n}; - warn qq{| KOHA_LOG="/tmp/t1.log" prove t/Logguer.t |\n}; - warn "+=======================================================+\n\n"; -} -- 1.7.2.5