Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2020-04-16 23:24:39 +0300
committerGitHub <noreply@github.com>2020-04-16 23:24:39 +0300
commit37182bfda5529ddb4ba2aaedd09beb1e5ae94fbb (patch)
treef6609b714e4e6cac35769f98e8f47f5e95071b5f /tests/PHPUnit/Fixtures
parente943702e1e54bfc71d423bfd2ec2a48c0a4610f7 (diff)
merge 3.x to 4.x (#15821)
* Avoid possible error subtable already exists but not loaded (#15779) * Make sure to always set JSON_PIWIK to native JSON when possible (#15785) * make sure to always set JSON_PIWIK to native JSON when possible * rebuilt piwik.js * Force POST for bulk requests, fix alwaysUseSendBeacon not respected for bulk requests (#15784) * Force POST for bulk requests, fix alwaysUseSendBeacon not respected for bulk requests * rebuilt piwik.js * Make sure to clean up tracking failures before sending email notification (#15798) Feedback from a customer... Eg the daily `cleanupTrackingFailures()` action might be only executed after the weekly `notifyTrackingFailures` therefore we should try to clean up failures first and then check if any are left. Avoids the case where a user opens hours later the email they receive and then there are no tracking failures reported. This could still happen but it's a bit less likely. * 3.13.5-b1 * Faster segmented suggested values when browser archiving is disabled (#15786) * Faster segmented suggested values when browser archiving is disabled * make sure no segment is set * remove wrong var type * fix/add tests * add more segment values * detect if we should flatten or not * add docs * Fix problem when comparing segments or opening popovers (#15809) refs #15805 * purge all old archives regardless of done value (#15800) * purge all old archives regardless of done value, we only care about the newest usable one * Fix test and start on new one. * Add coverage for change in tests. * there is no longer an inner join so should not need the idsite check * Add more parameters to the computeNbUnique event (#15808) * 3.13.5-b2 * One click update in two parts so new code is loaded for second. (#15770) * One click update in two parts so new code is loaded for second. * remove no longer needed code Co-authored-by: Thomas Steur <tsteur@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com> Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r--tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php73
1 files changed, 61 insertions, 12 deletions
diff --git a/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php b/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
index b007548eae..bd9fe5210d 100644
--- a/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
+++ b/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
@@ -215,11 +215,21 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'date1' => '2015-02-08',
'date2' => '2015-02-14',
'period' => 2,
+ 'ts_archived' => '2015-02-15 14:00:00'
+ ),
+ array(
+ 'idarchive' => 18,
+ 'idsite' => 2,
+ 'name' => 'doneDUMMYHASHSTR',
+ 'value' => ArchiveWriter::DONE_OK,
+ 'date1' => '2015-02-08',
+ 'date2' => '2015-02-14',
+ 'period' => 2,
'ts_archived' => '2015-02-16 00:00:00'
),
array(
- 'idarchive' => 18,
+ 'idarchive' => 19,
'idsite' => 3,
'name' => 'done',
'value' => ArchiveWriter::DONE_OK,
@@ -230,7 +240,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
),
array(
- 'idarchive' => 19,
+ 'idarchive' => 20,
'idsite' => 1,
'name' => 'doneDUMMYHASHSTR',
'value' => ArchiveWriter::DONE_OK_TEMPORARY,
@@ -239,12 +249,25 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'period' => 1,
'ts_archived' => '2015-02-28 16:12:12' // must be late so it doesn't screw up the purgeOutdatedArchives test
),
+
+ // newer done_ok
+ array(
+ 'idarchive' => 21,
+ 'idsite' => 1,
+ 'name' => 'done',
+ 'value' => ArchiveWriter::DONE_OK,
+ 'date1' => '2015-02-10',
+ 'date2' => '2015-02-10',
+ 'period' => 1,
+ 'ts_archived' => '2015-02-09 14:13:14'
+ ),
+
);
private static $segmentArchiveData = array(
array(
- 'idarchive' => 20,
+ 'idarchive' => 22,
'idsite' => 1,
'name' => 'doneeb5d2797aedd15d819b1a20425982850', // Raw segment = abcd1234abcd5678
'value' => ArchiveWriter::DONE_OK,
@@ -254,7 +277,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 21,
+ 'idarchive' => 23,
'idsite' => 1,
'name' => 'doneeb5d2797aedd15d819b1a20425982850.MyPlugin', // Raw segment = abcd1234abcd5678
'value' => ArchiveWriter::DONE_OK,
@@ -264,7 +287,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 22,
+ 'idarchive' => 24,
'idsite' => 2,
'name' => 'doneeb5d2797aedd15d819b1a20425982850', // Raw segment = abcd1234abcd5678
'value' => ArchiveWriter::DONE_OK,
@@ -274,7 +297,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 23,
+ 'idarchive' => 25,
'idsite' => 2,
'name' => 'doneeb5d2797aedd15d819b1a20425982850.MyPlugin', // Raw segment = abcd1234abcd5678
'value' => ArchiveWriter::DONE_OK,
@@ -284,7 +307,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 24,
+ 'idarchive' => 26,
'idsite' => 1,
'name' => 'done1e39a89fcc269acc36bd4d7c742763ed', // Raw segment = 9876fedc5432abcd
'value' => ArchiveWriter::DONE_OK,
@@ -294,7 +317,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 25,
+ 'idarchive' => 27,
'idsite' => 2,
'name' => 'done00c6ee2e21a7548de6260cf72c4f4b5b', // Raw segment = hash1
'value' => ArchiveWriter::DONE_OK,
@@ -304,7 +327,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 26,
+ 'idarchive' => 28,
'idsite' => 2,
'name' => 'done58833651db311ba4bc11cb26b1900b0f', // Raw segment = hash2
'value' => ArchiveWriter::DONE_OK,
@@ -314,7 +337,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 27,
+ 'idarchive' => 29,
'idsite' => 2,
'name' => 'done58833651db311ba4bc11cb26b1900b0f.MyPlugin', // Raw segment = hash2
'value' => ArchiveWriter::DONE_OK,
@@ -324,7 +347,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 28,
+ 'idarchive' => 30,
'idsite' => 2,
'name' => 'done1a4ead8b39d17dfe89418452c9bba770', // Raw segment = hash3
'value' => ArchiveWriter::DONE_OK,
@@ -334,7 +357,7 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
'ts_archived' => '2015-02-03 12:12:12'
),
array(
- 'idarchive' => 29,
+ 'idarchive' => 31,
'idsite' => 2,
'name' => 'done1a4ead8b39d17dfe89418452c9bba770', // Raw segment = hash3
'value' => ArchiveWriter::DONE_OK,
@@ -345,6 +368,30 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
),
);
+ public static $dummyArchiveDataNoInvalidated = [
+ // two archives w/ DONE_OK for a new site (no invalidated archives for site)
+ [
+ 'idarchive' => 32,
+ 'idsite' => 4,
+ 'name' => 'done',
+ 'value' => ArchiveWriter::DONE_OK,
+ 'date1' => '2015-02-11',
+ 'date2' => '2015-02-11',
+ 'period' => 1,
+ 'ts_archived' => '2015-02-27 10:12:12'
+ ],
+ [
+ 'idarchive' => 33,
+ 'idsite' => 4,
+ 'name' => 'done',
+ 'value' => ArchiveWriter::DONE_OK,
+ 'date1' => '2015-02-11',
+ 'date2' => '2015-02-11',
+ 'period' => 1,
+ 'ts_archived' => '2015-02-27 12:12:12'
+ ],
+ ];
+
/**
* @var Date
*/
@@ -377,6 +424,8 @@ class RawArchiveDataWithTempAndInvalidated extends Fixture
$dummyArchiveData = $this->setDatesOnArchiveData($archiveDate, self::$dummyArchiveData);
$this->insertArchiveRows($archiveDate, $dummyArchiveData);
+ $dummySiteNoInvalidated = $this->setDatesOnArchiveData($archiveDate, self::$dummyArchiveDataNoInvalidated);
+ $this->insertArchiveRows($archiveDate, $dummySiteNoInvalidated);
}
private function insertArchiveRows(Date $archiveDate, array $dummyArchiveData)