From 9414be37385351403f5eb6359ea463e743b4a016 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
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
---
 t/Logger.t |   12 ++----------
 1 file 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.10.4