Bugzilla – Attachment 66921 Details for
Bug 15339
TestBuilder build parameter warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15339: TestBuilder warnings (code)
Bug-15339-TestBuilder-warnings-code.patch (text/plain), 1.28 KB, created by
Marcel de Rooy
on 2017-09-07 10:09:58 UTC
(
hide
)
Description:
Bug 15339: TestBuilder warnings (code)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-09-07 10:09:58 UTC
Size:
1.28 KB
patch
obsolete
>From bdeb82cc8bf51ce8504480334e13c6301ee5e30a Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Tue, 8 Dec 2015 20:55:01 +0100 >Subject: [PATCH] Bug 15339: TestBuilder warnings (code) >Content-Type: text/plain; charset=utf-8 > >Makes TestBuilder::build() alert the user when unreognized >parameters are passed, which happens when the user supplies >the column values directly, forgetting the 'value' hash. > >This patch holds the code changes. Examples of the kind of >errors that it catches are in the tests (separate patch). > >Sponsored-By: Halland County Library > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/lib/TestBuilder.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 2df9f04..45df23e 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -89,6 +89,9 @@ sub build { > my $source = $params->{source} || return; > my $value = $params->{value}; > >+ my @unknowns = grep( !/source|value|only_fk/, keys %{ $params }); >+ carp "Unknown parameter(s): ", join( ', ', @unknowns ) if scalar @unknowns; >+ > my $col_values = $self->_buildColumnValues({ > source => $source, > value => $value, >-- >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 15339
:
45527
|
45528
|
66892
|
66893
|
66894
| 66921 |
66922
|
66923
|
66924
|
66951