From ddb38021b7ae42515be67e58a108d397200f713c Mon Sep 17 00:00:00 2001 From: Zach Sim Date: Tue, 18 Jan 2011 11:14:21 +1300 Subject: [PATCH] Added extra unit tests to Debug.t Signed-off-by: Chris Cormack (cherry picked from commit 3b22fc6cc0267473fea7f7431ce9bc9861145b0d) Signed-off-by: Chris Nighswonger --- t/Debug.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/Debug.t b/t/Debug.t index 967229cc0f..54ef5c65f5 100755 --- a/t/Debug.t +++ b/t/Debug.t @@ -3,11 +3,13 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 5; use vars qw($debug $cgi_debug); BEGIN { +$ENV{'KOHA_CGI_DEBUG'}='2'; +$ENV{'KOHA_DEBUG'}='5'; diag "BEFORE use: \$debug is " . (defined $debug ? $debug : 'not defined'); diag "BEFORE use: \$cgi_debug is " . (defined $cgi_debug ? $cgi_debug : 'not defined'); use_ok('C4::Debug'); @@ -17,5 +19,7 @@ diag " AFTER use: \$debug is " . (defined $debug ? $debug : 'not def diag " AFTER use: \$cgi_debug is " . (defined $cgi_debug ? $cgi_debug : 'not defined'); ok(defined $debug, " \$debug defined and imported."); ok(defined $cgi_debug, "\$cgi_debug defined and imported."); +is($cgi_debug,2,"cgi_debug gets the ENV{'KOHA_CGI_DEBUG'}"); +is($debug,5,"debug gets the ENV{'KOHA_DEBUG'}"); diag "Done."; -- 2.39.5