summaryrefslogtreecommitdiffstats
path: root/xt/lib/Bugzilla/Test/Search/FieldTest.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-16 04:55:10 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-16 04:55:10 +0200
commitdbaf1c3aaf975ed78d8e8538b2df18ab9f47654b (patch)
treedb913e59441783297ad780e89cd372897a6ec184 /xt/lib/Bugzilla/Test/Search/FieldTest.pm
parent6a2a01fbc44c5a777b3a612540a9ced23401c2bc (diff)
downloadbugzilla-dbaf1c3aaf975ed78d8e8538b2df18ab9f47654b.tar.gz
bugzilla-dbaf1c3aaf975ed78d8e8538b2df18ab9f47654b.tar.xz
Bug 398308: Make Search.pm take a hashref for its "params" argument
instead of taking a CGI object. r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'xt/lib/Bugzilla/Test/Search/FieldTest.pm')
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTest.pm18
1 files changed, 7 insertions, 11 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
index 4d24c5bd3..558742f71 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
@@ -26,7 +26,6 @@ package Bugzilla::Test::Search::FieldTest;
use strict;
use warnings;
-use Bugzilla::Test::Search::FakeCGI;
use Bugzilla::Search;
use Bugzilla::Test::Search::Constants;
@@ -278,19 +277,16 @@ sub join_broken {
# The CGI object that will get passed to Bugzilla::Search as its arguments.
sub search_params {
- my $self = shift;
+ my ($self) = @_;
return $self->{search_params} if $self->{search_params};
- my $field = $self->field;
- my $operator = $self->operator;
- my $value = $self->translated_value;
-
- my $cgi = new Bugzilla::Test::Search::FakeCGI;
- $cgi->param("field0-0-0", $field);
- $cgi->param('type0-0-0', $operator);
- $cgi->param('value0-0-0', $value);
+ my %params = (
+ "field0-0-0" => $self->field,
+ "type0-0-0" => $self->operator,
+ "value0-0-0" => $self->translated_value,
+ );
- $self->{search_params} = $cgi;
+ $self->{search_params} = \%params;
return $self->{search_params};
}