Bug 22254: Correction to datehandling in test
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 1 Feb 2019 09:55:54 +0000 (09:55 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 25 Feb 2019 10:17:29 +0000 (11:17 +0100)
commit28191756d181e468af6944db3f9285d80c8b527a
treedc46b3996a09017000cfc42997325936818aaaba
parent3a19cfad18d0acdb67722de134ff53525599a645
Bug 22254: Correction to datehandling in test

Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6fdf38cfd3d3ea63ec076b15995610f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba244af3560861785f5aa74ab457f00b02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60f8ca789f713c3a5c7e3478bac7132165b9092d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Koha/Patrons.t