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:
authorMatthieu Aubry <matt@piwik.org>2015-10-09 00:41:29 +0300
committerMatthieu Aubry <matt@piwik.org>2015-10-09 00:41:29 +0300
commit4432578633498ef0d145b8a3b2345afbb640663b (patch)
treebb6096e1aa9baa391a90b0ddf2f23d4d5a3afaa2
parent5990deecac78c6116a2c9b1752619a8a4fb7e7ed (diff)
parent83f1368a01d6e0d8917e58580a337823583abc31 (diff)
Merge pull request #8941 from piwik/8923_usersettings_bc
Re-add backwards compatibility for URLs using old UserSettings plugin.
-rw-r--r--plugins/DevicePlugins/DevicePlugins.php7
-rw-r--r--plugins/DevicePlugins/tests/System/UserSettingsBCTest.php78
-rw-r--r--plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___API.getMetadata_day.xml23
-rw-r--r--plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___DevicePlugins.getPlugin_day.xml63
-rw-r--r--plugins/DevicesDetection/DevicesDetection.php20
-rw-r--r--plugins/DevicesDetection/tests/System/UserSettingsBCTest.php83
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___API.getMetadata_day.xml36
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___DevicesDetection.getBrowsers_day.xml15
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___API.getMetadata_day.xml35
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___DevicesDetection.getBrowsers_day.xml16
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___API.getMetadata_day.xml36
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___DevicesDetection.getBrowsers_day.xml16
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___API.getMetadata_day.xml35
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___DevicesDetection.getBrowsers_day.xml76
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___API.getMetadata_day.xml35
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___DevicesDetection.getBrowsers_day.xml15
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___API.getMetadata_day.xml35
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___DevicesDetection.getBrowsers_day.xml16
-rw-r--r--plugins/Resolution/Resolution.php8
-rw-r--r--plugins/Resolution/tests/System/UserSettingsBCTest.php79
-rw-r--r--plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___API.getMetadata_day.xml36
-rw-r--r--plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___Resolution.getResolution_day.xml14
-rw-r--r--plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___API.getMetadata_day.xml35
-rw-r--r--plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___Resolution.getResolution_day.xml15
-rw-r--r--plugins/UserLanguage/UserLanguage.php12
-rw-r--r--plugins/UserLanguage/tests/System/UserSettingsBCTest.php78
-rw-r--r--plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___API.getMetadata_day.xml35
-rw-r--r--plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___UserLanguage.getLanguage_day.xml15
-rw-r--r--plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___API.getMetadata_day.xml35
-rw-r--r--plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___UserLanguage.getLanguage_day.xml15
-rw-r--r--tests/PHPUnit/Unit/DeprecatedMethodsTest.php5
-rw-r--r--tests/UI/specs/ImageGraph_spec.js2
-rw-r--r--tests/UI/specs/UIIntegration_spec.js6
33 files changed, 1026 insertions, 4 deletions
diff --git a/plugins/DevicePlugins/DevicePlugins.php b/plugins/DevicePlugins/DevicePlugins.php
index 3ac882e8ce..5ddc6d15d3 100644
--- a/plugins/DevicePlugins/DevicePlugins.php
+++ b/plugins/DevicePlugins/DevicePlugins.php
@@ -25,6 +25,7 @@ class DevicePlugins extends \Piwik\Plugin
return array(
'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ 'Request.getRenamedModuleAndAction' => 'renameUserSettingsModuleAndAction',
);
}
@@ -45,4 +46,10 @@ class DevicePlugins extends \Piwik\Plugin
$translations = array_merge($translations, $metrics);
}
+ public function renameUserSettingsModuleAndAction(&$module, &$action)
+ {
+ if ($module == 'UserSettings' && $action == 'getPlugin') {
+ $module = 'DevicePlugins';
+ }
+ }
}
diff --git a/plugins/DevicePlugins/tests/System/UserSettingsBCTest.php b/plugins/DevicePlugins/tests/System/UserSettingsBCTest.php
new file mode 100644
index 0000000000..1901960abb
--- /dev/null
+++ b/plugins/DevicePlugins/tests/System/UserSettingsBCTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\DevicePlugins\tests\System;
+
+use Piwik\Tests\Fixtures\OneVisitorTwoVisits;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+
+/**
+ * @group DevicePlugins
+ * @group DevicePlugins_System
+ */
+class UserSettingsBCTest extends SystemTestCase
+{
+ /**
+ * @var OneVisitorTwoVisits
+ */
+ public static $fixture;
+
+ /**
+ * @dataProvider getApiForTesting
+ */
+ public function test_Api($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ public function getApiForTesting()
+ {
+ $idSite = self::$fixture->idSite;
+ $dateTime = self::$fixture->dateTime;
+
+ $api = array(
+ 'UserSettings.getPlugin',
+ );
+
+ $result = array();
+
+
+ foreach ($api as $method) {
+ list($module, $action) = explode('.', $method);
+
+ // api test (uses hack to test UserSettings which doesn't exist anymore. we say we're testing
+ // against DevicePlugins & overwrite the module & action w/ otherRequestParameters)
+ $result[] = array('DevicePlugins.getPlugin', array('idSite' => $idSite,
+ 'date' => $dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => $module . '_' . $method . '_',
+ 'otherRequestParameters' => array(
+ 'method' => $method,
+ ),
+ ));
+
+ // api metadata tests
+ $result[] = array('API.getMetadata', array(
+ 'idSite' => $idSite,
+ 'date' => $dateTime,
+ 'apiModule' => $module,
+ 'apiAction' => $action,
+ 'testSuffix' => $module . '_' . $method . '_',
+ ));
+ }
+
+ return $result;
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+}
+
+UserSettingsBCTest::$fixture = new OneVisitorTwoVisits(); \ No newline at end of file
diff --git a/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___API.getMetadata_day.xml b/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___API.getMetadata_day.xml
new file mode 100644
index 0000000000..9a4f403963
--- /dev/null
+++ b/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___API.getMetadata_day.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Settings</category>
+ <name>Browser Plugins</name>
+ <module>DevicePlugins</module>
+ <action>getPlugin</action>
+ <dimension>Plugin</dimension>
+ <documentation>This report shows which browser plugins your visitors had enabled. This information might be important for choosing the right way to deliver your content.</documentation>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_visits_percentage>% Visits</nb_visits_percentage>
+ </processedMetrics>
+ <constantRowsCount>1</constantRowsCount>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicePlugins&amp;apiAction=getPlugin&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <uniqueId>DevicePlugins_getPlugin</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___DevicePlugins.getPlugin_day.xml b/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___DevicePlugins.getPlugin_day.xml
new file mode 100644
index 0000000000..72728977e1
--- /dev/null
+++ b/plugins/DevicePlugins/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getPlugin___DevicePlugins.getPlugin_day.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Cookie</label>
+ <nb_visits>2</nb_visits>
+ <nb_visits_percentage>100%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/cookie.gif</logo>
+ </row>
+ <row>
+ <label>Flash</label>
+ <nb_visits>2</nb_visits>
+ <nb_visits_percentage>100%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/flash.gif</logo>
+ </row>
+ <row>
+ <label>Java</label>
+ <nb_visits>2</nb_visits>
+ <nb_visits_percentage>100%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/java.gif</logo>
+ </row>
+ <row>
+ <label>Director</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/director.gif</logo>
+ </row>
+ <row>
+ <label>Gears</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/gears.gif</logo>
+ </row>
+ <row>
+ <label>Pdf</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/pdf.gif</logo>
+ </row>
+ <row>
+ <label>Quicktime</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/quicktime.gif</logo>
+ </row>
+ <row>
+ <label>Realplayer</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/realplayer.gif</logo>
+ </row>
+ <row>
+ <label>Silverlight</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/silverlight.gif</logo>
+ </row>
+ <row>
+ <label>Windowsmedia</label>
+ <nb_visits>0</nb_visits>
+ <nb_visits_percentage>0%</nb_visits_percentage>
+ <logo>plugins/DevicePlugins/images/plugins/windowsmedia.gif</logo>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php
index 5385b29354..2fd7b59fd2 100644
--- a/plugins/DevicesDetection/DevicesDetection.php
+++ b/plugins/DevicesDetection/DevicesDetection.php
@@ -23,7 +23,8 @@ class DevicesDetection extends \Piwik\Plugin
public function registerEvents()
{
return array(
- 'Live.getAllVisitorDetails' => 'extendVisitorDetails'
+ 'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ 'Request.getRenamedModuleAndAction' => 'renameUserSettingsModuleAndAction',
);
}
@@ -49,4 +50,21 @@ class DevicesDetection extends \Piwik\Plugin
$visitor['browserVersion'] = $instance->getBrowserVersion();
}
+ public function renameUserSettingsModuleAndAction(&$module, &$action)
+ {
+ $movedMethods = array(
+ 'index' => 'software',
+ 'getBrowser' => 'getBrowsers',
+ 'getBrowserVersion' => 'getBrowserVersions',
+ 'getMobileVsDesktop' => 'getType',
+ 'getOS' => 'getOsVersions',
+ 'getOSFamily' => 'getOsFamilies',
+ 'getBrowserType' => 'getBrowserEngines',
+ );
+
+ if ($module == 'UserSettings' && array_key_exists($action, $movedMethods)) {
+ $module = 'DevicesDetection';
+ $action = $movedMethods[$action];
+ }
+ }
}
diff --git a/plugins/DevicesDetection/tests/System/UserSettingsBCTest.php b/plugins/DevicesDetection/tests/System/UserSettingsBCTest.php
new file mode 100644
index 0000000000..e86887780d
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/UserSettingsBCTest.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\DevicesDetection\tests\System;
+
+use Piwik\Tests\Fixtures\OneVisitorTwoVisits;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+
+/**
+ * @group DevicesDetection
+ * @group DevicesDetection_System
+ */
+class UserSettingsBCTest extends SystemTestCase
+{
+ /**
+ * @var OneVisitorTwoVisits
+ */
+ public static $fixture;
+
+ /**
+ * @dataProvider getApiForTesting
+ */
+ public function test_Api($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ public function getApiForTesting()
+ {
+ $idSite = self::$fixture->idSite;
+ $dateTime = self::$fixture->dateTime;
+
+ $api = array(
+ 'UserSettings.getBrowser',
+ 'UserSettings.getBrowserVersion',
+ 'UserSettings.getMobileVsDesktop',
+ 'UserSettings.getOS',
+ 'UserSettings.getOSFamily',
+ 'UserSettings.getBrowserType',
+ );
+
+ $result = array();
+
+
+ foreach ($api as $method) {
+ list($module, $action) = explode('.', $method);
+
+ // api test (uses hack to test UserSettings which doesn't exist anymore. we say we're testing
+ // against DevicesDetection & overwrite the module & action w/ otherRequestParameters)
+ $result[] = array('DevicesDetection.getBrowsers', array('idSite' => $idSite,
+ 'date' => $dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => $module . '_' . $method . '_',
+ 'otherRequestParameters' => array(
+ 'method' => $method,
+ ),
+ ));
+
+ // api metadata tests
+ $result[] = array('API.getMetadata', array(
+ 'idSite' => $idSite,
+ 'date' => $dateTime,
+ 'apiModule' => $module,
+ 'apiAction' => $action,
+ 'testSuffix' => $module . '_' . $method . '_',
+ ));
+ }
+
+ return $result;
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+}
+
+UserSettingsBCTest::$fixture = new OneVisitorTwoVisits(); \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___API.getMetadata_day.xml
new file mode 100644
index 0000000000..59301a5809
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___API.getMetadata_day.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Browser engines</name>
+ <module>DevicesDetection</module>
+ <action>getBrowserEngines</action>
+ <dimension>Browser engine</dimension>
+ <documentation>This report shows your visitors' browsers broken down into browser engines. &lt;br /&gt; The most important information for web developers is what kind of rendering engine their visitors are using. The labels contain the names of the engines followed by the most common browser using that engine in brackets.</documentation>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowserEngines&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowserEngines&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getBrowserEngines</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..7e5e262294
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserType___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Gecko (Firefox)</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>browserEngine==Gecko</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___API.getMetadata_day.xml
new file mode 100644
index 0000000000..ae5eedde52
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Browser version</name>
+ <module>DevicesDetection</module>
+ <action>getBrowserVersions</action>
+ <dimension>Browser version</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowserVersions&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowserVersions&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getBrowserVersions</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..3c2fe50a07
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowserVersion___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Firefox 3.6</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>browserCode==FF;browserVersion==3.6</segment>
+ <logo>plugins/DevicesDetection/images/browsers/FF.gif</logo>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___API.getMetadata_day.xml
new file mode 100644
index 0000000000..5c5b2df10a
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___API.getMetadata_day.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Visitor Browser</name>
+ <module>DevicesDetection</module>
+ <action>getBrowsers</action>
+ <dimension>Browser</dimension>
+ <documentation>This report contains information about what kind of browser your visitors were using. Each browser version is listed separately.</documentation>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowsers&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getBrowsers&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getBrowsers</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..68128919af
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getBrowser___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Firefox</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <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/DevicesDetection/images/browsers/FF.gif</logo>
+ <segment>browserCode==FF</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___API.getMetadata_day.xml
new file mode 100644
index 0000000000..377949b52e
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Device type</name>
+ <module>DevicesDetection</module>
+ <action>getType</action>
+ <dimension>Device type</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getType&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getType&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getType</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..e2c2f35414
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getMobileVsDesktop___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Desktop</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>deviceType==desktop</segment>
+ <logo>plugins/DevicesDetection/images/screens/normal.gif</logo>
+ </row>
+ <row>
+ <label>Camera</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==camera</segment>
+ <logo>plugins/DevicesDetection/images/screens/camera.png</logo>
+ </row>
+ <row>
+ <label>Car browser</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==car+browser</segment>
+ <logo>plugins/DevicesDetection/images/screens/carbrowser.png</logo>
+ </row>
+ <row>
+ <label>Console</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==console</segment>
+ <logo>plugins/DevicesDetection/images/screens/console.gif</logo>
+ </row>
+ <row>
+ <label>Feature phone</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==feature+phone</segment>
+ <logo>plugins/DevicesDetection/images/screens/mobile.gif</logo>
+ </row>
+ <row>
+ <label>Phablet</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==phablet</segment>
+ <logo>plugins/DevicesDetection/images/screens/unknown.gif</logo>
+ </row>
+ <row>
+ <label>Portable media player</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==portable+media+player</segment>
+ <logo>plugins/DevicesDetection/images/screens/unknown.gif</logo>
+ </row>
+ <row>
+ <label>Smart display</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==smart+display</segment>
+ <logo>plugins/DevicesDetection/images/screens/unknown.gif</logo>
+ </row>
+ <row>
+ <label>Smartphone</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==smartphone</segment>
+ <logo>plugins/DevicesDetection/images/screens/smartphone.png</logo>
+ </row>
+ <row>
+ <label>Tablet</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==tablet</segment>
+ <logo>plugins/DevicesDetection/images/screens/tablet.png</logo>
+ </row>
+ <row>
+ <label>Tv</label>
+ <nb_visits>0</nb_visits>
+ <segment>deviceType==tv</segment>
+ <logo>plugins/DevicesDetection/images/screens/tv.png</logo>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___API.getMetadata_day.xml
new file mode 100644
index 0000000000..23934c7263
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Operating System families</name>
+ <module>DevicesDetection</module>
+ <action>getOsFamilies</action>
+ <dimension>Operating system family</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getOsFamilies&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getOsFamilies&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getOsFamilies</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..1883e1f03e
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOSFamily___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Windows</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <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/DevicesDetection/images/os/WIN.gif</logo>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___API.getMetadata_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___API.getMetadata_day.xml
new file mode 100644
index 0000000000..7d6d669f04
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Devices</category>
+ <name>Operating System versions</name>
+ <module>DevicesDetection</module>
+ <action>getOsVersions</action>
+ <dimension>Operating System versions</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getOsVersions&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=DevicesDetection&amp;apiAction=getOsVersions&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>DevicesDetection_getOsVersions</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___DevicesDetection.getBrowsers_day.xml b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___DevicesDetection.getBrowsers_day.xml
new file mode 100644
index 0000000000..ee964d53f1
--- /dev/null
+++ b/plugins/DevicesDetection/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getOS___DevicesDetection.getBrowsers_day.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Windows XP</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>operatingSystemCode==WIN;operatingSystemVersion==XP</segment>
+ <logo>plugins/DevicesDetection/images/os/WIN.gif</logo>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Resolution/Resolution.php b/plugins/Resolution/Resolution.php
index 5ab7692ccf..7bd8cc3be0 100644
--- a/plugins/Resolution/Resolution.php
+++ b/plugins/Resolution/Resolution.php
@@ -23,6 +23,7 @@ class Resolution extends \Piwik\Plugin
{
return array(
'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ 'Request.getRenamedModuleAndAction' => 'renameUserSettingsModuleAndAction',
);
}
@@ -32,4 +33,11 @@ class Resolution extends \Piwik\Plugin
$visitor['resolution'] = $instance->getResolution();
}
+
+ public function renameUserSettingsModuleAndAction(&$module, &$action)
+ {
+ if ($module == 'UserSettings' && ($action == 'getResolution' || $action == 'getConfiguration')) {
+ $module = 'Resolution';
+ }
+ }
}
diff --git a/plugins/Resolution/tests/System/UserSettingsBCTest.php b/plugins/Resolution/tests/System/UserSettingsBCTest.php
new file mode 100644
index 0000000000..beae888701
--- /dev/null
+++ b/plugins/Resolution/tests/System/UserSettingsBCTest.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\Resolution\tests\System;
+
+use Piwik\Tests\Fixtures\OneVisitorTwoVisits;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+
+/**
+ * @group Resolution
+ * @group Resolution_System
+ */
+class UserSettingsBCTest extends SystemTestCase
+{
+ /**
+ * @var OneVisitorTwoVisits
+ */
+ public static $fixture;
+
+ /**
+ * @dataProvider getApiForTesting
+ */
+ public function test_Api($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ public function getApiForTesting()
+ {
+ $idSite = self::$fixture->idSite;
+ $dateTime = self::$fixture->dateTime;
+
+ $api = array(
+ 'UserSettings.getResolution',
+ 'UserSettings.getConfiguration',
+ );
+
+ $result = array();
+
+
+ foreach ($api as $method) {
+ list($module, $action) = explode('.', $method);
+
+ // api test (uses hack to test UserSettings which doesn't exist anymore. we say we're testing
+ // against Resolution & overwrite the module & action w/ otherRequestParameters)
+ $result[] = array('Resolution.getResolution', array('idSite' => $idSite,
+ 'date' => $dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => $module . '_' . $method . '_',
+ 'otherRequestParameters' => array(
+ 'method' => $method,
+ ),
+ ));
+
+ // api metadata tests
+ $result[] = array('API.getMetadata', array(
+ 'idSite' => $idSite,
+ 'date' => $dateTime,
+ 'apiModule' => $module,
+ 'apiAction' => $action,
+ 'testSuffix' => $module . '_' . $method . '_',
+ ));
+ }
+
+ return $result;
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+}
+
+UserSettingsBCTest::$fixture = new OneVisitorTwoVisits(); \ No newline at end of file
diff --git a/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___API.getMetadata_day.xml b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___API.getMetadata_day.xml
new file mode 100644
index 0000000000..01fee59915
--- /dev/null
+++ b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___API.getMetadata_day.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Settings</category>
+ <name>Visitor Configuration</name>
+ <module>Resolution</module>
+ <action>getConfiguration</action>
+ <dimension>Configuration</dimension>
+ <documentation>This report shows the most common overall configurations that your visitors had. A configuration is the combination of an operating system, a browser type and a screen resolution.</documentation>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Resolution&amp;apiAction=getConfiguration&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Resolution&amp;apiAction=getConfiguration&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>Resolution_getConfiguration</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___Resolution.getResolution_day.xml b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___Resolution.getResolution_day.xml
new file mode 100644
index 0000000000..a4804d3e5d
--- /dev/null
+++ b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getConfiguration___Resolution.getResolution_day.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>Windows / Firefox / 1024x768</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___API.getMetadata_day.xml b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___API.getMetadata_day.xml
new file mode 100644
index 0000000000..b99815c557
--- /dev/null
+++ b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Settings</category>
+ <name>Screen Resolution</name>
+ <module>Resolution</module>
+ <action>getResolution</action>
+ <dimension>Resolution</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Resolution&amp;apiAction=getResolution&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Resolution&amp;apiAction=getResolution&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>Resolution_getResolution</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___Resolution.getResolution_day.xml b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___Resolution.getResolution_day.xml
new file mode 100644
index 0000000000..2d97656958
--- /dev/null
+++ b/plugins/Resolution/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getResolution___Resolution.getResolution_day.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>1024x768</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>resolution==1024x768</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/UserLanguage/UserLanguage.php b/plugins/UserLanguage/UserLanguage.php
index be892d4196..7bb409a5e3 100644
--- a/plugins/UserLanguage/UserLanguage.php
+++ b/plugins/UserLanguage/UserLanguage.php
@@ -22,7 +22,8 @@ class UserLanguage extends \Piwik\Plugin
public function registerEvents()
{
return array(
- 'Live.getAllVisitorDetails' => 'extendVisitorDetails'
+ 'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ 'Request.getRenamedModuleAndAction' => 'renameUserSettingsModuleAndAction',
);
}
@@ -44,4 +45,11 @@ class UserLanguage extends \Piwik\Plugin
$out .= '<h2 piwik-enriched-headline>' . Piwik::translate('UserLanguage_BrowserLanguage') . '</h2>';
$out .= FrontController::getInstance()->fetchDispatch('UserLanguage', 'getLanguage');
}
-} \ No newline at end of file
+
+ public function renameUserSettingsModuleAndAction(&$module, &$action)
+ {
+ if ($module == 'UserSettings' && ($action == 'getLanguage' || $action == 'getLanguageCode')) {
+ $module = 'UserLanguage';
+ }
+ }
+}
diff --git a/plugins/UserLanguage/tests/System/UserSettingsBCTest.php b/plugins/UserLanguage/tests/System/UserSettingsBCTest.php
new file mode 100644
index 0000000000..208048b8cc
--- /dev/null
+++ b/plugins/UserLanguage/tests/System/UserSettingsBCTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\UserLanguage\tests\System;
+
+use Piwik\Tests\Fixtures\OneVisitorTwoVisits;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+
+/**
+ * @group UserLanguage
+ * @group UserLanguage_System
+ */
+class UserSettingsBCTest extends SystemTestCase
+{
+ /**
+ * @var OneVisitorTwoVisits
+ */
+ public static $fixture;
+
+ /**
+ * @dataProvider getApiForTesting
+ */
+ public function test_Api($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ public function getApiForTesting()
+ {
+ $idSite = self::$fixture->idSite;
+ $dateTime = self::$fixture->dateTime;
+
+ $api = array(
+ 'UserSettings.getLanguage',
+ 'UserSettings.getLanguageCode',
+ );
+
+ $result = array();
+
+ foreach ($api as $method) {
+ list($module, $action) = explode('.', $method);
+
+ // api test (uses hack to test UserSettings which doesn't exist anymore. we say we're testing
+ // against UserLanguage & overwrite the module & action w/ otherRequestParameters)
+ $result[] = array('UserLanguage.getLanguage', array('idSite' => $idSite,
+ 'date' => $dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => $module . '_' . $method . '_',
+ 'otherRequestParameters' => array(
+ 'method' => $method,
+ ),
+ ));
+
+ // api metadata tests
+ $result[] = array('API.getMetadata', array(
+ 'idSite' => $idSite,
+ 'date' => $dateTime,
+ 'apiModule' => $module,
+ 'apiAction' => $action,
+ 'testSuffix' => $module . '_' . $method . '_',
+ ));
+ }
+
+ return $result;
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+}
+
+UserSettingsBCTest::$fixture = new OneVisitorTwoVisits(); \ No newline at end of file
diff --git a/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___API.getMetadata_day.xml b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___API.getMetadata_day.xml
new file mode 100644
index 0000000000..9bf598e68f
--- /dev/null
+++ b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Settings</category>
+ <name>Language code</name>
+ <module>UserLanguage</module>
+ <action>getLanguageCode</action>
+ <dimension>Language</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=UserLanguage&amp;apiAction=getLanguageCode&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=UserLanguage&amp;apiAction=getLanguageCode&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>UserLanguage_getLanguageCode</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___UserLanguage.getLanguage_day.xml b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___UserLanguage.getLanguage_day.xml
new file mode 100644
index 0000000000..de31fc9d35
--- /dev/null
+++ b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguageCode___UserLanguage.getLanguage_day.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>French (fr)</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>languageCode==fr</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___API.getMetadata_day.xml b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___API.getMetadata_day.xml
new file mode 100644
index 0000000000..9e886e4c3f
--- /dev/null
+++ b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___API.getMetadata_day.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <category>Visitor Settings</category>
+ <name>Browser language</name>
+ <module>UserLanguage</module>
+ <action>getLanguage</action>
+ <dimension>Language</dimension>
+ <metrics>
+ <nb_visits>Visits</nb_visits>
+ <nb_uniq_visitors>Unique visitors</nb_uniq_visitors>
+ <nb_actions>Actions</nb_actions>
+ <nb_users>Users</nb_users>
+ </metrics>
+ <metricsDocumentation>
+ <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
+ <nb_uniq_visitors>The number of unduplicated visitors coming to your website. Every user is only counted once, even if he visits the website multiple times a day.</nb_uniq_visitors>
+ <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
+ <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
+ <nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
+ <avg_time_on_site>The average duration of a visit.</avg_time_on_site>
+ <bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
+ <conversion_rate>The percentage of visits that triggered a goal conversion.</conversion_rate>
+ </metricsDocumentation>
+ <processedMetrics>
+ <nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
+ <avg_time_on_site>Avg. Time on Website</avg_time_on_site>
+ <bounce_rate>Bounce Rate</bounce_rate>
+ <conversion_rate>Conversion Rate</conversion_rate>
+ </processedMetrics>
+ <imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=UserLanguage&amp;apiAction=getLanguage&amp;period=day&amp;date=2010-03-06</imageGraphUrl>
+ <imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=UserLanguage&amp;apiAction=getLanguage&amp;period=day&amp;date=2010-02-05,2010-03-06</imageGraphEvolutionUrl>
+ <uniqueId>UserLanguage_getLanguage</uniqueId>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___UserLanguage.getLanguage_day.xml b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___UserLanguage.getLanguage_day.xml
new file mode 100644
index 0000000000..2e95d73c83
--- /dev/null
+++ b/plugins/UserLanguage/tests/System/expected/test_UserSettingsBCTestUserSettings_UserSettings.getLanguage___UserLanguage.getLanguage_day.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>French</label>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_actions>8</nb_actions>
+ <nb_users>0</nb_users>
+ <max_actions>7</max_actions>
+ <sum_visit_length>1621</sum_visit_length>
+ <bounce_count>1</bounce_count>
+ <nb_visits_converted>2</nb_visits_converted>
+ <segment>languageCode==fr,languageCode=@fr-</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/Unit/DeprecatedMethodsTest.php b/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
index 8d797576d3..c123378941 100644
--- a/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
+++ b/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
@@ -72,6 +72,11 @@ class DeprecatedMethodsTest extends \PHPUnit_Framework_TestCase
$this->assertDeprecatedMethodIsRemovedInPiwik3('\Piwik\Archive', 'getDataTableFromArchive');
$this->assertDeprecatedMethodIsRemovedInPiwik3('\Piwik\Plugin', 'getListHooksRegistered');
$this->assertDeprecatedMethodIsRemovedInPiwik3('\Piwik\Plugins\API\API', 'getLastDate');
+
+ $this->assertDeprecatedMethodIsRemovedInPiwik3('Piwik\Plugins\DevicesDetection\DevicesDetection', 'renameUserSettingsModuleAndAction');
+ $this->assertDeprecatedMethodIsRemovedInPiwik3('Piwik\Plugins\Resolution\Resolution', 'renameUserSettingsModuleAndAction');
+ $this->assertDeprecatedMethodIsRemovedInPiwik3('Piwik\Plugins\DevicePlugins\DevicePlugins', 'renameUserSettingsModuleAndAction');
+ $this->assertDeprecatedMethodIsRemovedInPiwik3('Piwik\Plugins\UserLanguage\UserLanguage', 'renameUserSettingsModuleAndAction');
}
private function assertDeprecatedMethodIsRemoved($className, $method, $removalDate)
diff --git a/tests/UI/specs/ImageGraph_spec.js b/tests/UI/specs/ImageGraph_spec.js
index 570ebabe5b..057f7306e0 100644
--- a/tests/UI/specs/ImageGraph_spec.js
+++ b/tests/UI/specs/ImageGraph_spec.js
@@ -23,7 +23,7 @@ describe("ImageGraph", function () {
it("should render horizontal bar graphs correctly", function (done) {
expect.screenshot('horizontal_bar').to.be.similar(.95).to.capture(function (page) {
- page.load(getImageGraphUrl('DevicesDetection', 'getBrowsers', 'horizontalBar', 'year', '2012-01-01'));
+ page.load(getImageGraphUrl('UserSettings', 'getBrowser', 'horizontalBar', 'year', '2012-01-01'));
}, done);
});
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index ab5a5ec6aa..ddb7bf6456 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -110,6 +110,12 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
}, done);
});
+ it('should redirect the old UserSettings index to visitors > software', function (done) {
+ expect.screenshot('usersettings_index').to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
+ page.load("?" + urlBase + "#" + generalParams + "&module=UserSettings&action=index");
+ }, done);
+ });
+
it('should load the visitors > times page correctly', function (done) {
expect.screenshot("visitors_times").to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=VisitTime&action=index");