https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17770

--- Comment #10 from M. Tompsett <mtomp...@hotmail.com> ---
(In reply to Marcel de Rooy from comment #9)
> You are mocking now while there is only one call left. Why not just call
> DateTime->now only once to fill $now ? First getting the complete date and
> then extracting ymd later is unneeded?

Yes, only 85 directly uses it. However, there are tests on
lines 71, 83, 97, 100, 116, 129, 145, 154, 164, 182, 185, 193, 196, and 204.

Any of these that trigger DateTime->now()->ymd on line 109 of
Koha::SiteMapper::Writer needs the mock. Otherwise the end tag won't match.

I added a nice print STDERR "TRIGGERED!\n"; just about it and determined that
the tests 4, 8, and 11 use it. This means this mock will fix not just test 12's
more typical failure, but even the rarest cases of 5 and 9.

Plus, I was implementing exactly what was suggested in comment #0 by Katrin
Fischer.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to