diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-12-01 03:46:49 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-12-01 03:46:49 +0300 |
commit | 48c8ca9e4da5a01695aa3c0d49d301ce35b3d35d (patch) | |
tree | 3b02ec7fd3a717878f78e6284c45581dd2013dd9 /tests/PHPUnit/Fixtures | |
parent | 107147670f46b234afadefe82e0c384b10c41279 (diff) |
Tracking API: when overriding the request datetime with an invalid token_auth, don't track the request (#10899)
* refs #10890 ignore tracking requests with custom timestamp, accept timestamps up to 1 day in past, added config for timestamps that require auth
* fix test
* update travis yml
* update travis
* update travis
* fix test
* added changelog entry
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* New config.ini.php setting: `tracking_requests_require_authentication_when_custom_timestamp_newer_than`
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r-- | tests/PHPUnit/Fixtures/ManySitesImportedLogs.php | 2 | ||||
-rw-r--r-- | tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php index 3a107c26bd..f89fc4948b 100644 --- a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php +++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php @@ -41,6 +41,8 @@ class ManySitesImportedLogs extends Fixture GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files'; LocationProvider::setCurrentProvider('geoip_php'); + self::createSuperUser(); + $this->trackVisits(); $this->setupSegments(); } diff --git a/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php b/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php index d7fe5e51a6..c190cb2f77 100644 --- a/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php +++ b/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php @@ -13,6 +13,7 @@ use Piwik\Db; use Piwik\Plugins\Goals\API as APIGoals; use Piwik\Plugins\SitesManager\API as APISitesManager; use Piwik\Tests\Framework\Fixture; +use Piwik\Tracker\Cache; /** * This fixture adds one website and tracks two visits by one visitor. @@ -84,8 +85,12 @@ class OneVisitorTwoVisits extends Fixture APISitesManager::getInstance()->setSiteSpecificUserAgentExcludeEnabled(false); } + self::createSuperUser(); $t = self::getTracker($idSite, $dateTime, $defaultInit = true); + Cache::clearCacheGeneral(); + Cache::regenerateCacheWebsiteAttributes(array($idSite)); + if ($this->useThirdPartyCookies) { $t->DEBUG_APPEND_URL = '&forceUseThirdPartyCookie=1'; } |