From 4ba4c89d62bc9d115e5d389e421bfca192da3008 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Feb 2017 09:15:29 +0100 Subject: [PATCH] Bug 17835: Mock language pref value That way if prefs contain other languages, the test will still pass. Signed-off-by: Josef Moravec --- t/db_dependent/Koha/ItemTypes.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t index 8f3dad2..e1ae330 100755 --- a/t/db_dependent/Koha/ItemTypes.t +++ b/t/db_dependent/Koha/ItemTypes.t @@ -22,6 +22,7 @@ use Modern::Perl; use Test::More tests => 20; use Data::Dumper; use Koha::Database; +use t::lib::Mocks; BEGIN { use_ok('Koha::ItemType'); @@ -114,6 +115,8 @@ is( $type->summary, 'summary', 'summary' ); is( $type->checkinmsg, 'checkinmsg', 'checkinmsg' ); is( $type->checkinmsgtype, 'checkinmsgtype', 'checkinmsgtype' ); +t::lib::Mocks::mock_preference('language', 'en'); +t::lib::Mocks::mock_preference('opaclanguages', 'en'); my $itemtypes = Koha::ItemTypes->search_with_localization; is( $itemtypes->count, 3, 'There are 3 item types' ); my $first_itemtype = $itemtypes->next; -- 2.9.3