Bugzilla – Attachment 160888 Details for
Bug 35536
Improve removal of Koha plugins in unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35536: Remove last two references to resultset PluginData
Bug-35536-Remove-last-two-references-to-resultset-.patch (text/plain), 2.04 KB, created by
Kyle M Hall (khall)
on 2024-01-11 16:53:41 UTC
(
hide
)
Description:
Bug 35536: Remove last two references to resultset PluginData
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-01-11 16:53:41 UTC
Size:
2.04 KB
patch
obsolete
>From dd827962b78c61a65976225ea1851a5203e2e94b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 19 Dec 2023 15:29:35 +0000 >Subject: [PATCH] Bug 35536: Remove last two references to resultset PluginData > >Test plan: >Run t/db_dependent/Koha/Plugins/Plugins.t > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Plugins.pm | 5 ++--- > t/db_dependent/Koha/Plugins/Plugins.t | 4 +--- > 2 files changed, 3 insertions(+), 6 deletions(-) > >diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm >index cd089535154..d93e9fe40fc 100644 >--- a/Koha/Plugins.pm >+++ b/Koha/Plugins.pm >@@ -121,9 +121,8 @@ sub get_enabled_plugins { > > my @plugin_classes; > try { >- my $rs = Koha::Database->schema->resultset('PluginData'); >- $rs = $rs->search({ plugin_key => '__ENABLED__', plugin_value => 1 }); >- @plugin_classes = $rs->get_column('plugin_class')->all(); >+ my $rs = Koha::Plugins::Datas->search({ plugin_key => '__ENABLED__', plugin_value => 1 }); >+ @plugin_classes = $rs->get_column('plugin_class'); > } catch { > warn "$_"; > }; >diff --git a/t/db_dependent/Koha/Plugins/Plugins.t b/t/db_dependent/Koha/Plugins/Plugins.t >index 53ef4f9a315..1dcd8578b16 100755 >--- a/t/db_dependent/Koha/Plugins/Plugins.t >+++ b/t/db_dependent/Koha/Plugins/Plugins.t >@@ -194,9 +194,7 @@ subtest 'Version upgrade tests' => sub { > my $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } ); > > # make sure there's no version on the DB >- $schema->resultset('PluginData') >- ->search( { plugin_class => $plugin->{class}, plugin_key => '__INSTALLED_VERSION__' } ) >- ->delete; >+ Koha::Plugins::Datas->search( { plugin_class => $plugin->{class}, plugin_key => '__INSTALLED_VERSION__' } )->delete; > > $plugin = Koha::Plugin::Test->new( { enable_plugins => 1, cgi => CGI->new } ); > my $version = $plugin->retrieve_data('__INSTALLED_VERSION__'); >-- >2.30.2
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 35536
:
159804
|
159820
|
159821
|
159822
|
159823
|
159824
|
159825
|
159830
|
159839
|
159840
|
159841
|
159842
|
159843
|
159844
|
160024
|
160025
|
160026
|
160027
|
160028
|
160029
|
160030
|
160031
|
160032
|
160801
|
160802
|
160803
|
160804
|
160805
|
160806
|
160807
|
160808
|
160809
|
160817
|
160818
|
160819
|
160820
|
160821
|
160822
|
160823
|
160824
|
160825
|
160881
|
160882
|
160883
|
160884
|
160885
|
160886
|
160887
| 160888 |
160889
|
163701
|
163797