Skip to content
Extraits de code Groupes Projets
Valider 09dcfc15 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Fixing build, another attempt...

parent 339679a1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -273,7 +273,7 @@ class Test_Piwik_Integration_BlobReportLimitingTest extends IntegrationTestCase
public static function setMockLocationProvider()
{
Piwik_UserCountry_LocationProvider::setCurrentProvider('mock_provider');
Piwik_UserCountry_LocationProvider::getCurrentProvider()->locations = array(
MockLocationProvider::$locations = array(
self::makeLocation('Toronto', 'ON', 'CA'),
self::makeLocation('Nice', 'B8', 'FR'),
......
......@@ -206,7 +206,7 @@ class Test_Piwik_Integration_ManyVisitorsOneWebsiteTest extends IntegrationTestC
{
Piwik_UserCountry_LocationProvider::$providers = null;
Piwik_UserCountry_LocationProvider::setCurrentProvider('mock_provider');
Piwik_UserCountry_LocationProvider::getCurrentProvider()->locations = array(
MockLocationProvider::$locations = array(
self::makeLocation('Stratford-upon-Avon', 'P3', 'gb', 123.456, 21.321), // template location
// same region, different city, same country
......
......@@ -8,7 +8,7 @@
class MockLocationProvider extends Piwik_UserCountry_LocationProvider
{
public $locations = array();
public static $locations = array();
private $currentLocation = 0;
private $ipToLocations = array();
......@@ -22,8 +22,8 @@ class MockLocationProvider extends Piwik_UserCountry_LocationProvider
}
else
{
$result = $this->locations[$this->currentLocation];
$this->currentLocation = ($this->currentLocation + 1) % count($this->locations);
$result = self::$locations[$this->currentLocation];
$this->currentLocation = ($this->currentLocation + 1) % count(self::$locations);
$this->ipToLocations[$ip] = $result;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter