Bugzilla – Attachment 130816 Details for
Bug 29625
Wrong var name in Koha::BiblioUtils get_all_biblios_iterator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29625: Add test for get_all_biblios_iterator
Bug-29625-Add-test-for-getallbibliositerator.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2022-02-18 10:03:36 UTC
(
hide
)
Description:
Bug 29625: Add test for get_all_biblios_iterator
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-02-18 10:03:36 UTC
Size:
1.52 KB
patch
obsolete
>From 6dd4663121591b518324b9df6b0623e4d3a4a63a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 18 Feb 2022 11:01:55 +0100 >Subject: [PATCH] Bug 29625: Add test for get_all_biblios_iterator > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/BiblioUtils/Iterator.t | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/BiblioUtils/Iterator.t b/t/db_dependent/Koha/BiblioUtils/Iterator.t >index ecc6db365c1..9b359541238 100755 >--- a/t/db_dependent/Koha/BiblioUtils/Iterator.t >+++ b/t/db_dependent/Koha/BiblioUtils/Iterator.t >@@ -17,14 +17,12 @@ > > use Modern::Perl; > >-use Test::More tests => 3; >+use Test::More tests => 7; > > use_ok('Koha::BiblioUtils'); > use_ok('Koha::BiblioUtils::Iterator'); > >-use C4::Items; >-use C4::Biblio; >-use DBI; >+use Koha::Database; > use t::lib::TestBuilder; > use t::lib::Mocks; > >@@ -60,4 +58,13 @@ my @result_tags = map { $_->tag() } $record->field('...'); > my @sorted_tags = sort @result_tags; > is_deeply(\@sorted_tags,$expected_tags, "Got the same tags as expected"); > >+ >+my $biblio_2 = $builder->build_sample_biblio(); >+my $biblio_3 = $builder->build_sample_biblio(); >+my $records = Koha::BiblioUtils->get_all_biblios_iterator(); >+is( $records->next->id, $biblio->biblionumber ); >+is( $records->next->id, $biblio_2->biblionumber ); >+is( $records->next->id, $biblio_3->biblionumber ); >+is( $records->next, undef, 'no more record' ); >+ > $schema->storage->txn_rollback(); >-- >2.25.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 29625
:
128183
|
129629
|
129839
|
130774
|
130815
| 130816