Koha-clms/t/db_dependent/Koha
Jonathan Druart 65c5407d41
Bug 25044: Remove the need to define koha_object[s]_class for standard object class names
In Koha::Object[s]->prefetch_whitelist, there is a call to the koha_object[s]_class DBIC resultset class. We should not, otherwise those 2 methods will have to be defined all the time, even when we can guess it easily.

Koha::Item <> Schema::Result::Item => standard
Koha::Acquisition::Order <> Schema::Result::Aqorder => non-standard

sub _get_object_class {
    my ( $type ) = @_;
    return unless $type;

    if( $type->can('koha_object_class') ) {
        return $type->koha_object_class;
    }
    $type =~ s|Schema::Result::||;
    return ${type};
}

Test plan:
 % prove t/db_dependent/Koha/Object.t t/db_dependent/Koha/Objects.t
should return green before and after this patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 08:35:53 +01:00
..
Account Bug 23051: (QA follow-up) Missing curly and tabs and fix test 2020-03-06 10:03:41 +00:00
Acquisition Bug 18177: (follow-up) remove aqbooksellers.currency 2020-03-27 15:48:15 +00:00
Biblio
…
BiblioUtils Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Cash Bug 24817: Replace sleep calls with date setting in test data 2020-03-09 10:38:35 +00:00
Charges Bug 21443: Remove the dependency on finesCalendar 2020-03-24 11:09:16 +00:00
Checkouts Bug 24507: Make Checkouts/ReturnClaim.t pass on MySQL 8 2020-01-24 15:20:18 +00:00
Club Bug 24546: Fix intentions of build_sample_item in Club/Hold.t 2020-01-31 13:55:55 +00:00
Config
…
Filter
…
IssuingRules Bug 18936: Fix IssuingRules/guess_article_requestable_itemtypes.t 2020-02-04 09:56:29 +00:00
Item
…
Library
…
Objects/Mixin
…
Patron Bug 20443: Move C4::Members::AttributeTypes::GetAttributeTypes to Koha::Patron::Attribute::Types 2020-03-23 13:44:35 +00:00
Patrons Bug 23473: (QA follow-up) Fix number of tests 2020-03-27 12:23:22 +00:00
Plugins Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
REST Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
SearchEngine Bug 23204: Fix tests swapping fields (they are not ordered) 2020-03-27 15:39:34 +00:00
Subscription
…
Tags
…
Template/Plugin Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
XSLT Bug 24052: Catch warning between test 5 and 6 2020-03-24 10:42:23 +00:00
Z3950Responder Bug 24827: Specify UTF-8 as encoding in new_from_xml() 2020-03-16 14:45:47 +00:00
Account.t Bug 24818: (RM follow-up) Update tests for DATE -> TIMESTAMP change 2020-03-19 13:05:58 +00:00
ActionLogs.t Bug 24329: Add a test 2020-01-08 11:05:00 +00:00
ApiKeys.t
…
Authorities.t
…
Biblio.t Bug 18936: (follow-up) Adjust circ rule related tests so that they pass 2020-02-04 09:56:29 +00:00
BiblioFrameworks.t
…
Biblios.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Checkouts.t
…
CirculationRules.t Bug 24602: Tests for get_onshlefholds_policy 2020-02-10 08:56:30 +00:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
CsvProfiles.t
…
Database.t Bug 22001: Add tests 2020-03-27 08:53:02 +00:00
Desks.t Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
GetDailyQuote.t
…
Holds.t Bug 24722: Add test 2020-03-17 16:48:52 +00:00
IssuingRules.t Bug 18936: (follow-up) Add cloning of circulation rules back to Koha 2020-02-04 09:56:29 +00:00
Item.t Bug 25006: Regression tests 2020-04-03 14:26:33 +01:00
ItemTypes.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Items.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
KeyboardShortcuts.t
…
Libraries.t Bug 22823: return undef if KohaAdminEmailAddress not exist 2020-03-18 15:44:27 +00:00
MarcSubfieldStructures.t
…
News.t
…
Notices.t
…
Object.t Bug 25044: Remove the need to define koha_object[s]_class for standard object class names 2020-04-14 08:35:53 +01:00
Objects.t Bug 25044: Remove the need to define koha_object[s]_class for standard object class names 2020-04-14 08:35:53 +01:00
Old.t Bug 24150: Prevent random failure comparing updated_on 2020-01-07 16:27:54 +00:00
Patron.t Bug 24459: Regression tests 2020-01-23 09:07:07 +00:00
Patrons.t Bug 22001: Fix Koha/Patrons.t 2020-03-31 17:47:48 +01:00
Ratings.t
…
Reports.t
…
Reviews.t
…
SMS_Providers.t
…
SearchField.t
…
SharedContent.t
…
Statistics.t Bug 24149: Add tests 2020-01-23 10:40:24 +00:00
Subscription.t
…
Suggestion.t Bug 24419: Add Koha::Suggestion->suggester accessor 2020-01-20 16:37:22 +00:00
Suggestions.t
…
Tags.t
…
Z3950Servers.t
…