Bugzilla – Attachment 181552 Details for
Bug 39745
Wrong system preference 'language' in test suite
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)
Bug-39745-Fix-wrong-system-preference-language-in-.patch (text/plain), 2.68 KB, created by
David Nind
on 2025-04-25 18:32:04 UTC
(
hide
)
Description:
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-04-25 18:32:04 UTC
Size:
2.68 KB
patch
obsolete
>From 8c12b49272f51ce645266bf7247dc6f98f7a82e7 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 25 Apr 2025 11:46:09 +0200 >Subject: [PATCH] Bug 39745: Fix wrong system preference 'language' in test > suite (mock_preference) > >Bug 27490 renamed system preference language to StaffInterfaceLanguages. >Needs to be done in test suite on mock_preference calls > >Test by running impacted tests > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Auth.t | 4 ++-- > t/db_dependent/Koha/ItemTypes.t | 4 ++-- > t/db_dependent/Koha/SharedContent.t | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t >index 9005d7ca41..616c97f326 100755 >--- a/t/db_dependent/Auth.t >+++ b/t/db_dependent/Auth.t >@@ -526,8 +526,8 @@ subtest 'get_template_and_user' => sub { # Tests for the language URL paramet > t::lib::Mocks::mock_preference( 'EnableOpacSearchHistory', 1 ); > > # Enable es-ES for the OPAC and staff interfaces >- t::lib::Mocks::mock_preference( 'OPACLanguages', 'en,es-ES' ); >- t::lib::Mocks::mock_preference( 'language', 'en,es-ES' ); >+ t::lib::Mocks::mock_preference( 'OPACLanguages', 'en,es-ES' ); >+ t::lib::Mocks::mock_preference( 'StaffInterfaceLanguages', 'en,es-ES' ); > > # we need a session cookie > $ENV{"SERVER_PORT"} = 80; >diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t >index 352aac8535..aeb7dcb6ab 100755 >--- a/t/db_dependent/Koha/ItemTypes.t >+++ b/t/db_dependent/Koha/ItemTypes.t >@@ -107,8 +107,8 @@ $type = Koha::ItemTypes->find( $child2->itemtype ); > ok( defined($type), 'second result' ); > is_deeply( $type->unblessed, $child2->unblessed, "We got back the same object" ); > >-t::lib::Mocks::mock_preference( 'language', 'en' ); >-t::lib::Mocks::mock_preference( 'OPACLanguages', 'en' ); >+t::lib::Mocks::mock_preference( 'StaffInterfaceLanguages', 'en' ); >+t::lib::Mocks::mock_preference( 'OPACLanguages', 'en' ); > my $itemtypes = Koha::ItemTypes->search_with_localization; > is( $itemtypes->count, $initial_count + 4, 'We added 4 item types' ); > my $first_itemtype = $itemtypes->next; >diff --git a/t/db_dependent/Koha/SharedContent.t b/t/db_dependent/Koha/SharedContent.t >index 8814531539..e901a18493 100755 >--- a/t/db_dependent/Koha/SharedContent.t >+++ b/t/db_dependent/Koha/SharedContent.t >@@ -153,7 +153,7 @@ my $subscription = $builder->build( > > t::lib::Mocks::mock_userenv( { patron => $loggedinuser } ); > >-t::lib::Mocks::mock_preference( 'language', 'en' ); >+t::lib::Mocks::mock_preference( 'StaffInterfaceLanguages', 'en' ); > > $post_request = 1; > $result = Koha::SharedContent::send_entity( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39745
:
181494
|
181498
|
181499
|
181551
|
181552
|
182103
|
182104