diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-03-18 04:07:34 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-03-18 04:07:34 +0300 |
commit | e1cb653e615c7bcdee52c4353f0bb07714835bc9 (patch) | |
tree | 7153ec78dd5b6cc2d6a7eef1315d9359fd3e9df3 /plugins | |
parent | 8dd2d8a8e15993d8bb5829aaa3b1256eaf769631 (diff) |
fix tests
Diffstat (limited to 'plugins')
3 files changed, 34 insertions, 30 deletions
diff --git a/plugins/DevicesDetection/API.php b/plugins/DevicesDetection/API.php index 1f4a53e48c..b6e484f924 100644 --- a/plugins/DevicesDetection/API.php +++ b/plugins/DevicesDetection/API.php @@ -216,7 +216,11 @@ class API extends \Piwik\Plugin\API */ public function getBrowserFamilies($idSite, $period, $date, $segment = false) { - return $this->getBrowsers($idSite, $period, $date, $segment); + $table = $this->getBrowsers($idSite, $period, $date, $segment); + // this one will not be sorted automatically by nb_visits since there is no Report class for it. + $table->filter('Sort', array(Metrics::INDEX_NB_VISITS, 'desc')); + + return $table; } /** diff --git a/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguageCode_day.xml b/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguageCode_day.xml index 02c15ad520..704c934193 100644 --- a/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguageCode_day.xml +++ b/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguageCode_day.xml @@ -45,7 +45,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Czech - Czech Republic (cs-cz)</label> + <label>Basque - Spain (eu-es)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -56,7 +56,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>German (de)</label> + <label>Chinese - Singapore (zh-sg)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -67,7 +67,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Greek - Greece (el-gr)</label> + <label>Czech - Czech Republic (cs-cz)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -78,7 +78,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Basque - Spain (eu-es)</label> + <label>French (fr)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -89,7 +89,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>French (fr)</label> + <label>French - Switzerland (fr-ch)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -100,7 +100,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>French - Switzerland (fr-ch)</label> + <label>German (de)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -111,7 +111,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Serbian - Serbia Montenegro (sr-cs)</label> + <label>Greek - Greece (el-gr)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -122,7 +122,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Thai (th)</label> + <label>Serbian - Serbia Montenegro (sr-cs)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -133,7 +133,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Unknown (xx)</label> + <label>Thai (th)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -144,7 +144,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Chinese - Singapore (zh-sg)</label> + <label>Unknown (xx)</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> diff --git a/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguage_day.xml b/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguage_day.xml index 18d4468a2e..04af2f2ccf 100644 --- a/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguage_day.xml +++ b/plugins/UserLanguage/tests/System/expected/test___UserLanguage.getLanguage_day.xml @@ -1,6 +1,17 @@ <?xml version="1.0" encoding="utf-8" ?> <result> <row> + <label>French</label> + <nb_uniq_visitors>3</nb_uniq_visitors> + <nb_visits>4</nb_visits> + <nb_actions>4</nb_actions> + <nb_users>0</nb_users> + <max_actions>1</max_actions> + <sum_visit_length>0</sum_visit_length> + <bounce_count>4</bounce_count> + <nb_visits_converted>0</nb_visits_converted> + </row> + <row> <label>Polish</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>3</nb_visits> @@ -23,17 +34,6 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>French</label> - <nb_uniq_visitors>3</nb_uniq_visitors> - <nb_visits>4</nb_visits> - <nb_actions>4</nb_actions> - <nb_users>0</nb_users> - <max_actions>1</max_actions> - <sum_visit_length>0</sum_visit_length> - <bounce_count>4</bounce_count> - <nb_visits_converted>0</nb_visits_converted> - </row> - <row> <label>Arabic</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> @@ -45,7 +45,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Czech</label> + <label>Basque</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -56,7 +56,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>German</label> + <label>Chinese</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -67,7 +67,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Greek</label> + <label>Czech</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -78,7 +78,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Basque</label> + <label>German</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -89,7 +89,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Serbian</label> + <label>Greek</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -100,7 +100,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Thai</label> + <label>Serbian</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -111,7 +111,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Unknown</label> + <label>Thai</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> @@ -122,7 +122,7 @@ <nb_visits_converted>0</nb_visits_converted> </row> <row> - <label>Chinese</label> + <label>Unknown</label> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> |