diff options
author | sgiehl <stefangiehl@gmail.com> | 2012-10-19 21:47:37 +0400 |
---|---|---|
committer | sgiehl <stefangiehl@gmail.com> | 2012-10-19 21:47:37 +0400 |
commit | 5762ad9e177d844593032133c99881417f56de5b (patch) | |
tree | 81bc88f1f37699f828bf38a15e66e7d3f9f9aa14 /plugins/UserCountry | |
parent | 389c28f97b53cd37d0719366aaa3ada479d7c053 (diff) |
refs #3227 removing plugin simple tests
git-svn-id: http://dev.piwik.org/svn/trunk@7240 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/tests/UserCountry.test.php | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/plugins/UserCountry/tests/UserCountry.test.php b/plugins/UserCountry/tests/UserCountry.test.php deleted file mode 100644 index 102dc9a743..0000000000 --- a/plugins/UserCountry/tests/UserCountry.test.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -if(!defined('PIWIK_CONFIG_TEST_INCLUDED')) -{ - require_once dirname(__FILE__)."/../../../tests/config_test.php"; -} - -require_once 'UserCountry/functions.php'; - -class Test_Piwik_UserCountry extends UnitTestCase -{ - public function test_getFlagFromCode() - { - $flag = Piwik_getFlagFromCode("us"); - $this->assertEqual( basename($flag), "us.png" ); - } - - public function test_getFlagFromInvalidCode() - { - $flag = Piwik_getFlagFromCode("foo"); - $this->assertEqual( basename($flag), "xx.png" ); - } - - public function test_flagsAndContinents() - { - require_once PIWIK_PATH_TEST_TO_ROOT . '/core/DataFiles/Countries.php'; - - $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($countries as $country => $continent) - { - // test continent - $this->assertTrue(in_array($continent, $continents), "$country => $continent"); - - // test flag - $this->assertTrue(in_array($country . '.png', $flags), $country); - } - - foreach($flags as $filename) - { - if($filename == '.' || $filename == '..' || $filename == '.svn') - { - continue; - } - - $country = substr($filename, 0, strpos($filename, '.png')); - - // test country - $this->assertTrue(array_key_exists($country, $countries), $filename); - } - } -} - |