Bugzilla – Attachment 174528 Details for
Bug 37448
Add build_sample_ill_request to TestBuilder.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37448: (QA follow-up) Squashed follow-ups:
Bug-37448-QA-follow-up-Squashed-follow-ups.patch (text/plain), 2.54 KB, created by
Pedro Amorim
on 2024-11-14 13:53:20 UTC
(
hide
)
Description:
Bug 37448: (QA follow-up) Squashed follow-ups:
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-14 13:53:20 UTC
Size:
2.54 KB
patch
obsolete
>From 06d5972cd9bdc0ce4b4bbf750cf265283518078b Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 14 Nov 2024 12:24:08 -0100 >Subject: [PATCH] Bug 37448: (QA follow-up) Squashed follow-ups: > >- Use Standard instead of FreeForm >-- Standard is now part of core Koha after 35570. Use that instead of relying on having FreeForm installed >- Add POD to build_sample_ill_request >- Use build_object instead of build -> return a Koha::ILL::Request obj instead of unblessed. >- Squashed typo fix in create_test_data.pl >--- > misc/devel/create_test_data.pl | 2 +- > t/lib/TestBuilder.pm | 27 +++++++++++++++++++++++---- > 2 files changed, 24 insertions(+), 5 deletions(-) > >diff --git a/misc/devel/create_test_data.pl b/misc/devel/create_test_data.pl >index be972ec886..eb078c28d1 100755 >--- a/misc/devel/create_test_data.pl >+++ b/misc/devel/create_test_data.pl >@@ -81,7 +81,7 @@ The DBIx::Class ResultSet source to use ( e.g. Branch, Category, EdifactMessage, > > =item B<-d|--data> <valumn>=<value> > >-Repeatable, set a given column to the specificed value for all generated data. >+Repeatable, set a given column to the specified value for all generated data. > > create_test_data.pl -n 5 -s Issue -d borrowernumber=42 -d -d branchcode=MPL > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 0db042f819..5aa1d0cdb7 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -210,19 +210,38 @@ sub build_sample_item { > )->store->get_from_storage; > } > >+=pod >+ >+=head2 build_sample_ill_request >+ >+Builds a sample ILL request with the supplied arguments. >+ >+C<$args> is a hashref with the following optional keys: >+ >+=over 4 >+ >+=item * C<biblio_id> (default: a new sample biblio created with L<build_sample_biblio>) >+ >+=item * C<backend> (default: Standard) >+ >+=item * C<branchcode> (default: a random branch) >+ >+=back >+ >+=cut > sub build_sample_ill_request { > my ( $self, $args ) = @_; > > $args->{biblio_id} = $args->{biblio_id} || $self->build_sample_biblio->biblionumber; >- $args->{backend} = $args->{backend} || 'FreeForm'; >+ $args->{backend} = $args->{backend} || 'Standard'; > $args->{branchcode} = $args->{branchcode} || $self->build_object( { class => 'Koha::Libraries' } )->branchcode; > >- return $self->build( >+ return $self->build_object( > { >- source => 'Illrequest', >+ class => 'Koha::ILL::Requests', > value => $args, > } >- ); >+ )->store->get_from_storage; > } > > # ------------------------------------------------------------------------------ >-- >2.39.5
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 37448
:
169472
|
169474
|
169486
|
169487
|
169488
|
169489
|
169490
|
169550
|
169551
|
169552
|
169553
|
174526
|
174528
|
174834
|
174835