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 <benaka@piwik.pro>2015-03-13 01:08:12 +0300
committerdiosmosis <benaka@piwik.pro>2015-03-13 01:08:43 +0300
commitd03cae1e4c5113f987c1df3ab90ab6e0e9f4e624 (patch)
treec200abe7e04ccd77ba1bb69e1258d561f707aceb /plugins
parent665e84bb698bf9fa1666e55d6e0380fe2fda783d (diff)
Fixing travis build (two tests only failed on travis). Fixing build failure due to QueuedTracking test that sets tracker database connection and starts transaction. Results in one LocalTracker call fail to add a visit in fixture for AttributeHistoricalDataWithLocationsTest, causing test to fail. Fixed by resetting static tracker DB connection in Fixture.php.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/UserCountry/tests/Unit/VisitorGeolocatorTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/UserCountry/tests/Unit/VisitorGeolocatorTest.php b/plugins/UserCountry/tests/Unit/VisitorGeolocatorTest.php
index b14cced3d9..a28a48bb14 100644
--- a/plugins/UserCountry/tests/Unit/VisitorGeolocatorTest.php
+++ b/plugins/UserCountry/tests/Unit/VisitorGeolocatorTest.php
@@ -14,6 +14,9 @@ use Piwik\Plugins\UserCountry\VisitorGeolocator;
use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Tracker\Cache;
use Piwik\Tracker\Visit;
+use Piwik\Tests\Framework\Mock\LocationProvider as MockLocationProvider;
+
+require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Framework/Mock/LocationProvider.php';
/**
* @group UserCountry
@@ -116,10 +119,10 @@ class VisitorGeolocatorTest extends PHPUnit_Framework_TestCase
public function test_get_shouldReturnCurrentProvider_IfCurrentProviderIsSet()
{
- Cache::setCacheGeneral(array('currentLocationProviderId' => LocationProvider\GeoIp\Pecl::ID));
+ Cache::setCacheGeneral(array('currentLocationProviderId' => MockLocationProvider::ID));
$geolocator = new VisitorGeolocator();
- $this->assertEquals(LocationProvider\GeoIp\Pecl::ID, $geolocator->getProvider()->getId());
+ $this->assertEquals(MockLocationProvider::ID, $geolocator->getProvider()->getId());
}
/**