From 71d87fd8ebcf45363078a1e5f765ed99e47314e1 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 4 Jun 2006 17:25:09 +0000 Subject: Bug 340226: Util.pm shouldn't depend on Bugzilla::Config - Patch by Frédéric Buclin r=mkanat a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- t/007util.t | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 't') diff --git a/t/007util.t b/t/007util.t index 02069dcc1..3adbe0ab4 100644 --- a/t/007util.t +++ b/t/007util.t @@ -28,18 +28,16 @@ use lib 't'; use Support::Files; BEGIN { - use Test::More tests => 14; + use Test::More tests => 15; + use_ok(Bugzilla); use_ok(Bugzilla::Util); } -# We need to override the the Param() function so we can get an expected -# value when Bugzilla::Utim::format_time calls asks for Param('timezone'). +# We need to override Bugzilla->params so we can get an expected value when +# Bugzilla::Util::format_time() calls ask for the 'timezone' parameter. # This will also prevent the tests from failing on site that do not have a -# data/params file containing Param('timezone') yet. -sub myParam { - return "TEST" if $_[0] eq 'timezone'; -} -*::Param = *myParam; +# data/params file containing 'timezone' yet. +Bugzilla->params->{'timezone'} = "TEST"; # we don't test the taint functions since that's going to take some more work. # XXX: test taint functions -- cgit v1.2.3-24-g4f1b