diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-04-30 11:01:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 11:01:39 +0300 |
commit | 8e2531cb6cfb00fdbc88a4622398b162b91715c2 (patch) | |
tree | 021ab271ab40e692aeda8c2512cd9e98e761289a /tests | |
parent | dba04710b179e48f5a7ae5d967a849ad57b3bc22 (diff) |
Fix determine segment rearchive date (#17505)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Integration/CronArchive/SegmentArchivingTest.php | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/tests/PHPUnit/Integration/CronArchive/SegmentArchivingTest.php b/tests/PHPUnit/Integration/CronArchive/SegmentArchivingTest.php index b160ebfc34..d178f9661c 100644 --- a/tests/PHPUnit/Integration/CronArchive/SegmentArchivingTest.php +++ b/tests/PHPUnit/Integration/CronArchive/SegmentArchivingTest.php @@ -49,11 +49,11 @@ class SegmentArchivingTest extends IntegrationTestCase public function getTestDataForGetReArchiveSegmentStartDate() { return [ - // no segment creation time => fallback to beginning of time + // no segment creation time [ SegmentArchiving::CREATION_TIME, [], - '2013-01-01', + null, ], // creation time @@ -84,11 +84,11 @@ class SegmentArchivingTest extends IntegrationTestCase '2020-04-14', ], - // last edit time, no edit or create time in segment => fallback to beginning of time + // last edit time, no edit or create time in segment [ SegmentArchiving::LAST_EDIT_TIME, [], - '2013-01-01', + null, ], // lastN @@ -98,6 +98,13 @@ class SegmentArchivingTest extends IntegrationTestCase '2020-05-13', ], + // lastN, no date available + [ + 'last30', + [], + null, + ], + // editLastN [ 'editLast30', @@ -105,6 +112,14 @@ class SegmentArchivingTest extends IntegrationTestCase '2020-08-14', ], + + // editLastN, no date available + [ + 'editLast30', + [], + null, + ], + // beginning of time [ SegmentArchiving::BEGINNING_OF_TIME, |