Bugzilla – Attachment 83149 Details for
Bug 21798
We need t::lib::TestBuilder::build_sample_biblio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21798: We need t::lib::TestBuilder::gimme_a_biblio
Bug-21798-We-need-tlibTestBuildergimmeabiblio.patch (text/plain), 1.17 KB, created by
Jonathan Druart
on 2018-12-13 12:42:52 UTC
(
hide
)
Description:
Bug 21798: We need t::lib::TestBuilder::gimme_a_biblio
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-12-13 12:42:52 UTC
Size:
1.17 KB
patch
obsolete
>From 99086c33958a1d0fc1825145a0bc2a00bbd15a62 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 8 Nov 2018 17:06:54 -0300 >Subject: [PATCH] Bug 21798: We need t::lib::TestBuilder::gimme_a_biblio > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/lib/TestBuilder.pm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index b01074c458..452d21ef92 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -125,6 +125,22 @@ sub build { > }); > } > >+sub gimme_a_biblio { >+ my ( $self, $args ) = @_; >+ >+ my $itemtype = $args->{itemtype} || $self->build_object({ class => 'Koha::ItemTypes' })->itemtype; >+ my $title = $args->{title} || 'Some boring read'; >+ >+ my $record = MARC::Record->new(); >+ $record->append_fields( >+ MARC::Field->new( '245', ' ', ' ', a => $title ), >+ MARC::Field->new( '942', ' ', ' ', c => $itemtype ) >+ ); >+ >+ my ($biblio_id) = AddBiblio( $record, '' ); >+ return Koha::Biblios->find($biblio_id); >+} >+ > # ------------------------------------------------------------------------------ > # Internal helper routines > >-- >2.11.0
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 21798
:
82116
|
82276
|
82277
|
82278
|
82943
|
83136
|
83137
|
83149
|
83150
|
83151
|
83152
|
83153
|
83154
|
83156
|
83157
|
83158
|
83159
|
83160
|
83161
|
83162
|
83163
|
84490
|
84491
|
84492
|
84493
|
84494
|
84495
|
84496