diff options
author | sgiehl <stefan@piwik.org> | 2014-10-30 00:03:16 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2014-10-30 00:03:16 +0300 |
commit | 2903e59ce01a554602142658ac23af0067495654 (patch) | |
tree | eae484a6d57a55d1f2a5ec882e6cfa809e4acc3c | |
parent | 261a60bdf5c1859b52dea41a1c8eac935911243a (diff) |
fixed some tests
7 files changed, 104 insertions, 10 deletions
diff --git a/plugins/DevicesDetection/API.php b/plugins/DevicesDetection/API.php index 08d094ed96..3f4ba9c2c4 100644 --- a/plugins/DevicesDetection/API.php +++ b/plugins/DevicesDetection/API.php @@ -156,7 +156,7 @@ class API extends \Piwik\Plugin\API */ public function getBrowserFamilies($idSite, $period, $date, $segment = false) { - $this->getBrowsers($idSite, $period, $date, $segment); + return $this->getBrowsers($idSite, $period, $date, $segment); } /** diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml index ef26c9f568..77308fd9e7 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml @@ -1,4 +1,63 @@ <?xml version="1.0" encoding="utf-8" ?> <result> - <success message="ok" /> + <row> + <label>Internet Explorer</label> + <nb_visits>6</nb_visits> + <nb_actions>6</nb_actions> + <max_actions>1</max_actions> + <sum_visit_length>0</sum_visit_length> + <bounce_count>6</bounce_count> + <nb_visits_converted>6</nb_visits_converted> + <sum_daily_nb_uniq_visitors>6</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <logo>plugins/UserSettings/images/browsers/IE.gif</logo> + </row> + <row> + <label>Chrome</label> + <nb_visits>10</nb_visits> + <nb_actions>13</nb_actions> + <max_actions>3</max_actions> + <sum_visit_length>305</sum_visit_length> + <bounce_count>8</bounce_count> + <nb_visits_converted>9</nb_visits_converted> + <sum_daily_nb_uniq_visitors>10</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <logo>plugins/UserSettings/images/browsers/CH.gif</logo> + </row> + <row> + <label>Unknown</label> + <nb_visits>7</nb_visits> + <nb_actions>7</nb_actions> + <max_actions>1</max_actions> + <sum_visit_length>0</sum_visit_length> + <bounce_count>7</bounce_count> + <nb_visits_converted>6</nb_visits_converted> + <sum_daily_nb_uniq_visitors>7</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <logo>plugins/UserSettings/images/browsers/UNK.gif</logo> + </row> + <row> + <label>Android Browser</label> + <nb_visits>2</nb_visits> + <nb_actions>2</nb_actions> + <max_actions>1</max_actions> + <sum_visit_length>0</sum_visit_length> + <bounce_count>2</bounce_count> + <nb_visits_converted>2</nb_visits_converted> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <logo>plugins/UserSettings/images/browsers/AN.gif</logo> + </row> + <row> + <label>Firefox</label> + <nb_visits>2</nb_visits> + <nb_actions>2</nb_actions> + <max_actions>1</max_actions> + <sum_visit_length>0</sum_visit_length> + <bounce_count>2</bounce_count> + <nb_visits_converted>2</nb_visits_converted> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <logo>plugins/UserSettings/images/browsers/FF.gif</logo> + </row> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__DevicesDetection.getBrowserFamilies_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__DevicesDetection.getBrowserFamilies_day.xml index ef26c9f568..84860eba92 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__DevicesDetection.getBrowserFamilies_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__DevicesDetection.getBrowserFamilies_day.xml @@ -1,4 +1,14 @@ <?xml version="1.0" encoding="utf-8" ?> <result> - <success message="ok" /> + <row> + <label>Firefox</label> + <nb_uniq_visitors>1</nb_uniq_visitors> + <nb_visits>2</nb_visits> + <nb_actions>8</nb_actions> + <max_actions>7</max_actions> + <sum_visit_length>1621</sum_visit_length> + <bounce_count>1</bounce_count> + <nb_visits_converted>2</nb_visits_converted> + <logo>plugins/UserSettings/images/browsers/FF.gif</logo> + </row> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrowserFamilies_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrowserFamilies_day.xml index ef26c9f568..968ffc7d90 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrowserFamilies_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrowserFamilies_day.xml @@ -1,4 +1,15 @@ <?xml version="1.0" encoding="utf-8" ?> <result> - <success message="ok" /> + <row> + <label>Firefox</label> + <nb_uniq_visitors>1</nb_uniq_visitors> + <nb_visits>2</nb_visits> + <nb_actions>9</nb_actions> + <nb_users>0</nb_users> + <max_actions>8</max_actions> + <sum_visit_length>1621</sum_visit_length> + <bounce_count>1</bounce_count> + <nb_visits_converted>2</nb_visits_converted> + <logo>plugins/UserSettings/images/browsers/FF.gif</logo> + </row> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_day.xml b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_day.xml index ef26c9f568..106f23f16b 100644 --- a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_day.xml +++ b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_day.xml @@ -1,4 +1,10 @@ <?xml version="1.0" encoding="utf-8" ?> -<result> - <success message="ok" /> -</result>
\ No newline at end of file +<results> + <result date="2009-01-04" /> + <result date="2009-01-05" /> + <result date="2009-01-06" /> + <result date="2009-01-07" /> + <result date="2009-01-08" /> + <result date="2009-01-09" /> + <result date="2009-01-10" /> +</results>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_week.xml b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_week.xml index e69de29bb2..5cfb246edc 100644 --- a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_week.xml +++ b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__DevicesDetection.getBrowserFamilies_week.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8" ?> +<results> + <result date="From 2008-12-29 to 2009-01-04" /> + <result date="From 2009-01-05 to 2009-01-11" /> + <result date="From 2009-01-12 to 2009-01-18" /> + <result date="From 2009-01-19 to 2009-01-25" /> + <result date="From 2009-01-26 to 2009-02-01" /> + <result date="From 2009-02-02 to 2009-02-08" /> + <result date="From 2009-02-09 to 2009-02-15" /> +</results>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_noVisit__DevicesDetection.getBrowserFamilies_day.xml b/tests/PHPUnit/System/expected/test_noVisit__DevicesDetection.getBrowserFamilies_day.xml index ef26c9f568..c234bed59e 100644 --- a/tests/PHPUnit/System/expected/test_noVisit__DevicesDetection.getBrowserFamilies_day.xml +++ b/tests/PHPUnit/System/expected/test_noVisit__DevicesDetection.getBrowserFamilies_day.xml @@ -1,4 +1,2 @@ <?xml version="1.0" encoding="utf-8" ?> -<result> - <success message="ok" /> -</result>
\ No newline at end of file +<result />
\ No newline at end of file |