Bugzilla – Attachment 61155 Details for
Bug 18093
Add the Koha::Objects->get_column method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18093: Add Koha::Objects->get_column
Bug-18093-Add-KohaObjects-getcolumn.patch (text/plain), 1.95 KB, created by
Marcel de Rooy
on 2017-03-16 07:39:13 UTC
(
hide
)
Description:
Bug 18093: Add Koha::Objects->get_column
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-03-16 07:39:13 UTC
Size:
1.95 KB
patch
obsolete
>From 33419ec00173526e5d81ca8d8733e811ffe35630 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 10 Feb 2017 09:45:26 +0100 >Subject: [PATCH] Bug 18093: Add Koha::Objects->get_column >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >Test plan: > prove t/db_dependent/Koha/Objects.t >Should return green > >Followed test plan, result as expected >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Objects.pm | 2 +- > t/db_dependent/Koha/Objects.t | 9 ++++++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index 86a5789..9afb02d 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -335,7 +335,7 @@ Currently count, pager, update and delete are covered. > sub AUTOLOAD { > my ( $self, @params ) = @_; > >- my @known_methods = qw( count pager update delete result_class single ); >+ my @known_methods = qw( count pager update delete result_class single get_column ); > my $method = our $AUTOLOAD; > $method =~ s/.*:://; > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index 29dea67..70c258b 100644 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 11; >+use Test::More tests => 12; > use Test::Warn; > > use Koha::Authority::Types; >@@ -127,6 +127,13 @@ subtest 'single' => sub { > "Warning is presented if single is used for a result with multiple rows."; > }; > >+subtest 'get_column' => sub { >+ plan tests => 1; >+ my @cities = Koha::Cities->search; >+ my @city_names = map { $_->city_name } @cities; >+ is_deeply( [ Koha::Cities->search->get_column('city_name')->all ], \@city_names, 'Koha::Objects->get_column should be allowed' ); >+}; >+ > subtest 'Exceptions' => sub { > plan tests => 2; > >-- >2.1.4
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 18093
:
60104
|
60115
|
61154
| 61155 |
61156