diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2022-08-08 18:16:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 18:16:17 +0300 |
commit | 1ef548f5a28d08f741697fd012a3c988b3e5c8a0 (patch) | |
tree | 9a897c569f5a53c35336466875a4717bd666cf1e /tests/PHPUnit | |
parent | a8338460fd9883e5458db31b24ca399fef99ba71 (diff) |
Fix for current year not processed for new custom reports (#19569)
* Ignore repair year invalidation when processing a week that spans two years
* Added integration test
* Fixed test
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r-- | tests/PHPUnit/Integration/CronArchiveTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/CronArchiveTest.php b/tests/PHPUnit/Integration/CronArchiveTest.php index 643908b973..64a5e17dd3 100644 --- a/tests/PHPUnit/Integration/CronArchiveTest.php +++ b/tests/PHPUnit/Integration/CronArchiveTest.php @@ -300,6 +300,37 @@ class CronArchiveTest extends IntegrationTestCase ), ], ], + + // week split across two years - make sure the year invalidation isn't changed to the week start year + [ + [ + ['idarchive' => 1, 'idsite' => 1, 'period' => 2, 'date1' => '2021-12-27', 'date2' => '2022-01-02', 'name' => 'done', 'report' => null, 'ts_invalidated' => '2022-03-04 01:00:00'], + ['idarchive' => 1, 'idsite' => 1, 'period' => 4, 'date1' => '2022-01-01', 'date2' => '2022-12-31', 'name' => 'done', 'report' => null, 'ts_invalidated' => '2022-03-04 01:00:00'], + ], + ['idarchive' => 1, 'idsite' => 1, 'period' => 2, 'date1' => '2021-12-27', 'date2' => '2022-01-02', 'name' => 'done', 'report' => null, 'ts_invalidated' => '2022-03-04 01:00:00'], + [ + array ( + 'idarchive' => '1', + 'idsite' => '1', + 'period' => '2', + 'date1' => '2021-12-27', + 'date2' => '2022-01-02', + 'name' => 'done', + 'report' => NULL, + 'ts_invalidated' => '2022-03-04 01:00:00', + ), + array ( + 'idarchive' => 1, + 'idsite' => '1', + 'period' => '4', + 'date1' => '2022-01-01', + 'date2' => '2022-12-31', + 'name' => 'done', + 'report' => NULL, + 'ts_invalidated' => '2022-03-04 01:00:00', + ), + ], + ], ]; } |