Koha/t/lib/KohaTest/Context.pm
Andrew Moore 551b95284e bug 1953 [1/2]: fixing SQL injection problem in C4::Context->preference
C4::Context->preference was not using placeholders and was potentially vulnerable to
a SQL injectin attack. This patch refactors the method to use placeholders.

Added some tests for C4::Context.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 11:25:58 -05:00

54 lines
1.4 KiB
Perl

package KohaTest::Context;
use base qw( KohaTest );
use strict;
use warnings;
use Test::More;
use C4::Context;
sub testing_class { 'C4::Context' };
sub methods : Test( 1 ) {
my $self = shift;
my @methods = qw(
AUTOLOAD
boolean_preference
config
dbh
db_scheme2dbi
get_shelves_userenv
get_versions
import
KOHAVERSION
marcfromkohafield
ModZebrations
new
new_dbh
preference
read_config_file
restore_context
restore_dbh
set_context
set_dbh
set_shelves_userenv
set_userenv
stopwords
userenv
Zconn
zebraconfig
_common_config
_new_dbh
_new_marcfromkohafield
_new_stopwords
_new_userenv
_new_Zconn
_unset_userenv
);
can_ok( $self->testing_class, @methods );
}
1;