[Koha-bugs] [Bug 18182] TestBuilder should be able to return Koha::Object objects
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 19 16:47:55 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18182
Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #62371|0 |1
is obsolete| |
Attachment #62372|0 |1
is obsolete| |
Attachment #62373|0 |1
is obsolete| |
Attachment #62374|0 |1
is obsolete| |
--- Comment #25 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 62383
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62383&action=edit
Bug 18182: Make TestBuilder capable of returning Koha::Object
This patch adds a new method to t::lib::TestBuilder so it can return
Koha::Object-derived objects. The new method is called ->build_object
and requires the plural of the target class to be passed.
'class' is a mandatory param, and a warning is raised and undef is
returned if absent.
It accepts 'value' as the original ->build() method, and that is passed as-is
to ->build().
To test:
- Apply the patches
- Run:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ prove t/db_dependent/TestBuilder.t
=> SUCCESS: Tests pass!
- Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list