diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-05-11 03:28:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 03:28:13 +0300 |
commit | 8366ad8ded026d8e6907a4738be44744c72a0312 (patch) | |
tree | 607f33569ed43e28505ae2260e0b52febc4eed08 /tests/PHPUnit/Fixtures | |
parent | 59301c3638c63a49a56f40965ecf50387c6c645f (diff) |
Do not confuse normal rows with the label "-1" w/ the summary row (#17517)
* add failing tests
* do not mistake normal rows w/ labels -1 for summary rows
* try to set a new flag to determine summary row inside Row instead of guessing from the label
* fix tests
* fix test hopefully
* fix another test
* fix another summary row issue
* Add test showing -1 label + Others row.
* apply review feedback
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r-- | tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php b/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php index e279138dd8..1ef910065c 100644 --- a/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php +++ b/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php @@ -39,6 +39,7 @@ class ManyVisitsWithMockLocationProvider extends Fixture $this->setMockLocationProvider(); $this->trackVisits(); + $this->trackVisitsForNegativeOneRowAndSummary(); ManyVisitsWithGeoIP::unsetLocationProvider(); } @@ -55,6 +56,23 @@ class ManyVisitsWithMockLocationProvider extends Fixture } } + private function trackVisitsForNegativeOneRowAndSummary() + { + $t = self::getTracker($this->idSite, '2015-02-03 00:00:00'); + $t->enableBulkTracking(); + + $t->setUrl('http://piwik.net/page'); + $t->doTrackEvent('-1', '-1', '-1'); + + for ($i = 0; $i != 20; ++$i) { + $t->setUrl('http://piwik.net/page'); + $t->setIp('120.34.5.' . $i); + $t->doTrackEvent('event category ' . $i, 'event action ' . $i, 'event name ' . $i); + } + + Fixture::checkBulkTrackingResponse($t->doBulkTrack()); + } + private function trackVisits() { $linuxFirefoxA = "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0"; |