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:
authorrobocoder <anthon.pang@gmail.com>2011-03-25 21:05:42 +0300
committerrobocoder <anthon.pang@gmail.com>2011-03-25 21:05:42 +0300
commit32b3f7d05b3331011e16e2e155ec0d9b521efdff (patch)
tree363375a32068e1b3dc75a3a69a803105320650f0 /plugins/UserCountry
parent58ac823cd85080ee3a6feb99e1abcf1a39341ef0 (diff)
fixes #2231
git-svn-id: http://dev.piwik.org/svn/trunk@4177 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/API.php2
-rw-r--r--plugins/UserCountry/tests/UserCountry.test.php7
2 files changed, 4 insertions, 5 deletions
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php
index 4cfe49763c..c41fd8028b 100644
--- a/plugins/UserCountry/API.php
+++ b/plugins/UserCountry/API.php
@@ -11,10 +11,8 @@
*/
/**
- * @see core/DataFiles/Countries.php
* @see plugins/UserCountry/functions.php
*/
-require_once PIWIK_INCLUDE_PATH . '/core/DataFiles/Countries.php';
require_once PIWIK_INCLUDE_PATH . '/plugins/UserCountry/functions.php';
/**
diff --git a/plugins/UserCountry/tests/UserCountry.test.php b/plugins/UserCountry/tests/UserCountry.test.php
index 85e5d5af79..102dc9a743 100644
--- a/plugins/UserCountry/tests/UserCountry.test.php
+++ b/plugins/UserCountry/tests/UserCountry.test.php
@@ -24,13 +24,14 @@ class Test_Piwik_UserCountry extends UnitTestCase
{
require_once PIWIK_PATH_TEST_TO_ROOT . '/core/DataFiles/Countries.php';
- $continents = array('unk', 'afr', 'amn', 'amc', 'ams', 'ant', 'asi', 'eur', 'oce');
+ $continents = $GLOBALS['Piwik_ContinentList'];
+ $countries = array_merge($GLOBALS['Piwik_CountryList'], $GLOBALS['Piwik_CountryList_Extras']);
// Get list of existing flag icons
$flags = scandir(PIWIK_PATH_TEST_TO_ROOT . '/plugins/UserCountry/flags/');
// Get list of countries
- foreach($GLOBALS['Piwik_CountryList'] as $country => $continent)
+ foreach($countries as $country => $continent)
{
// test continent
$this->assertTrue(in_array($continent, $continents), "$country => $continent");
@@ -49,7 +50,7 @@ class Test_Piwik_UserCountry extends UnitTestCase
$country = substr($filename, 0, strpos($filename, '.png'));
// test country
- $this->assertTrue(array_key_exists($country, $GLOBALS['Piwik_CountryList']), $filename);
+ $this->assertTrue(array_key_exists($country, $countries), $filename);
}
}
}