Bugzilla – Attachment 54221 Details for
Bug 17091
Add AUTOLOAD to Koha::Objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17091: Remove explicit declaration of Koha::Objects->reset
Bug-17091-Remove-explicit-declaration-of-KohaObjec.patch (text/plain), 1.87 KB, created by
Jonathan Druart
on 2016-08-09 15:24:09 UTC
(
hide
)
Description:
Bug 17091: Remove explicit declaration of Koha::Objects->reset
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-09 15:24:09 UTC
Size:
1.87 KB
patch
obsolete
>From b723555527e40152a3e4c95246235c25f5bf791a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Aug 2016 15:58:31 +0100 >Subject: [PATCH] Bug 17091: Remove explicit declaration of > Koha::Objects->reset > >Test plan: > prove t/db_dependent/Koha/Objects.t >should return green >--- > Koha/Objects.pm | 17 ----------------- > t/db_dependent/Koha/Objects.t | 11 ++++++++++- > 2 files changed, 10 insertions(+), 18 deletions(-) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index a1ee20d..1ff33b3 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -150,23 +150,6 @@ sub next { > return $object; > } > >-=head3 Koha::Objects->reset(); >- >-Koha::Objects->reset(); >- >-resets iteration so the next call to next() will start agein >-with the first object in a set. >- >-=cut >- >-sub reset { >- my ( $self ) = @_; >- >- $self->_resultset()->reset(); >- >- return $self; >-} >- > =head3 Koha::Objects->as_list(); > > Koha::Objects->as_list(); >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index bb75747..d1cb9e1 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 => 4; >+use Test::More tests => 5; > > use Koha::Authority::Types; > use Koha::Cities; >@@ -57,5 +57,14 @@ subtest 'pager' => sub { > is( ref($pager), 'DBIx::Class::ResultSet::Pager', 'Koha::Objects->pager returns a valid DBIx::Class object' ); > }; > >+subtest 'reset' => sub { >+ plan tests => 1; >+ my $builder = t::lib::TestBuilder->new; >+ my $patrons = Koha::Patrons->search; >+ my $first_borrowernumber = $patrons->next->borrowernumber; >+ my $second_borrowernumber = $patrons->next->borrowernumber; >+ is( $patrons->reset->next->borrowernumber, $first_borrowernumber, 'Koha::Objects->reset should work as expected'); >+}; >+ > $schema->storage->txn_rollback; > 1; >-- >2.8.1
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 17091
:
54217
|
54218
|
54219
|
54220
|
54221
|
54223
|
54272
|
54273
|
54274
|
54275
|
54276
|
54277
|
55378
|
56142
|
56143
|
56144
|
56145
|
56146
|
56147
|
56148