From c163e447718249ec78310c1626beb78bf89bc65f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 18 Aug 2023 12:16:29 +0000 Subject: [PATCH] Bug 34519: (follow-up) fix QA tool complaints --- Koha/Template/Plugin/ExtendedAttributeTypes.pm | 4 ++-- .../Template/Plugin/ExtendedAttributeTypes.t | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) mode change 100644 => 100755 t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t diff --git a/Koha/Template/Plugin/ExtendedAttributeTypes.pm b/Koha/Template/Plugin/ExtendedAttributeTypes.pm index 991666d164..9511b7325e 100644 --- a/Koha/Template/Plugin/ExtendedAttributeTypes.pm +++ b/Koha/Template/Plugin/ExtendedAttributeTypes.pm @@ -55,14 +55,14 @@ Koha::Template::Plugin::ExtendedAttributeTypes - TT Plugin for retrieving patron In a template, you can get the searchable attribute types with the following TT code: [% ExtendedAttributes.all( staff_searchable => 1 ) %] -The function returns the Koha::Patron::Atribute::Type objects +The function returns the Koha::Patron::Attribute::Type objects =head2 codes In a template, you can get the searchable attribute type codes with the following TT code: [% ExtendedAttributes.codes( staff_searchable => 1 ) %] -The function returns the Koha::Patron::Atribute::Type codes as an array +The function returns the Koha::Patron::Attribute::Type codes as an array =head1 AUTHOR diff --git a/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t b/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t old mode 100644 new mode 100755 index df1deae3a6..8ba60d8996 --- a/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t +++ b/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t @@ -42,34 +42,34 @@ my $typeA = $builder->build_object( class => 'Koha::Patron::Attribute::Types', value => { staff_searchable => 0, - description => "Desc type A", + description => "Desc type A", } } ); my $typeB = $builder->build_object( { - class => 'Koha::Patron::Attribute::Types', + class => 'Koha::Patron::Attribute::Types', value => { staff_searchable => 1, - description => "Desc type B", + description => "Desc type B", } } ); -my $all_plugin = $plugin->all(); +my $all_plugin = $plugin->all(); my $all_objects = Koha::Patron::Attribute::Types->search(); -is_deeply( $all_plugin->unblessed, $all_objects->unblessed, "all method returns all the types correctly"); +is_deeply( $all_plugin->unblessed, $all_objects->unblessed, "all method returns all the types correctly" ); my $all_plugin_codes = $plugin->codes(); my $all_object_codes = Koha::Patron::Attribute::Types->search()->get_column('code'); -is_deeply( $all_plugin_codes, $all_object_codes, "codes method returns the codes as expected"); +is_deeply( $all_plugin_codes, $all_object_codes, "codes method returns the codes as expected" ); -my $searchable_plugin_codes = $plugin->codes({ staff_searchable => 1 }); -my $searchable_object_codes = Koha::Patron::Attribute::Types->search({ staff_searchable => 1 })->get_column('code'); +my $searchable_plugin_codes = $plugin->codes( { staff_searchable => 1 } ); +my $searchable_object_codes = Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code'); -is_deeply( $searchable_plugin_codes, $searchable_object_codes, "searching plugin method works as expected"); +is_deeply( $searchable_plugin_codes, $searchable_object_codes, "searching plugin method works as expected" ); $schema->storage->txn_rollback; -- 2.30.2