From b71e8cde202d1a7b1043768237d51e2852ae289c Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 <josef.moravec@gmail.com>

Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
---
 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.7.4