]> git.koha-community.org Git - koha.git/commit
Bug 36593: Add 'time' column type support to TestBuilder
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 15 Apr 2024 09:56:53 +0000 (06:56 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 16 Apr 2024 15:59:42 +0000 (17:59 +0200)
commit86f917e2bd92a8d8a9ad6286e9a3cc695d2e3e53
tree152a1572064076059ce9b825bbd19398009ede23
parent9c2510ea2ef1db46bf42cf948b6c599250d6dd9e
Bug 36593: Add 'time' column type support to TestBuilder

This simple patch adds support for the 'time' column type.

To test:
1. Run:
   $ ktd --shell
  k$ perl -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my
$hour = $b->build_object({ class => "Koha::Library::Hours" });'
=> FAIL: It explodes as it doesn't know how to deal with the 'time'
column type
2. Apply this patch and the follow-up
3. Run:
  k$ prove -MDDP -Mt::lib::TestBuilder -e 'my $b =
t::lib::TestBuilder->new; my $h = $b->build_object({ class => "Koha::Library::Hours" }); p($h->unblessed);'
=> SUCCESS: It generates an hour!
4. Run:
  k$ prove t/db_dependent/TestBuilder.t
=> SUCCESS: It builds all the things!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
t/lib/TestBuilder.pm