Bug 15339: TestBuilder warnings (code)
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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
0c6538f033
commit
ebd1039bbd
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue