Bug 17726: TestBuilder - Add default values
commite021d93c311d96bc90dee390419f1f3c456608f7
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Dec 2016 22:38:40 +0000 (12 22:38 +0000)
committerMason James <mtj@kohaaloha.com>
Wed, 22 Feb 2017 08:58:03 +0000 (22 21:58 +1300)
treec72af16815cefddf07143856660a4d1c17aa9103
parentb1151b0f4f0065ab1ad6f2c06f091bc7ed7f7e1d
Bug 17726: TestBuilder - Add default values

The items.more_subfields_xml is set to random data (generated by
TestBuilder), and so GetMarcBiblio does not manage to embed items (if
needed).

The error is:
  :1: parser error : Start tag expected, '<' not found

More precisely it explodes in
C4::Items::_parse_unlinked_item_subfields_from_xml when
MARC::Record->new_from_xml is called with an invalid xml

This patch adds a default values mechanism to TestBuilder to avoid
modifying all the existing calls.

Test plan:
Set SearchEngine to ElasticSearch
prove t/db_dependent/Circulation.pl
should return green with this patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 41358176e1d276e47d3034a37bd089b7e6c7e846)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
t/db_dependent/TestBuilder.t
t/lib/TestBuilder.pm