diff options
Diffstat (limited to 'tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php')
-rw-r--r-- | tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php index 3abb1ee414..a9d77d5813 100644 --- a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php +++ b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php @@ -7,6 +7,7 @@ */ namespace Piwik\Tests\Fixtures; +use Piwik\Cache; use Piwik\Date; use Piwik\Plugins\Goals\API; use Piwik\Plugins\UserCountry\LocationProvider\GeoIp; @@ -90,6 +91,10 @@ class ManyVisitsWithGeoIP extends Fixture $dateTime = $this->dateTime; $idSite = $this->idSite; + if ($useLocal) { + Cache::getTransientCache()->flushAll(); // make sure dimension cache is empty between local tracking runs + } + // use local tracker so mock location provider can be used $t = self::getTracker($idSite, $dateTime, $defaultInit = true, $useLocal); if ($doBulk) { @@ -192,7 +197,7 @@ class ManyVisitsWithGeoIP extends Fixture self::checkResponse($t->doTrackPageView('It\'s pitch black...')); } - private function setLocationProvider($file) + public function setLocationProvider($file) { GeoIp::$dbNames['loc'] = array($file); GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files'; |