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
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Fixtures/ManySitesImportedLogs.php2
-rw-r--r--tests/PHPUnit/Framework/Fixture.php4
-rw-r--r--tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php3
-rw-r--r--tests/PHPUnit/Integration/DbHelperTest.php48
-rw-r--r--tests/PHPUnit/Integration/HttpTest.php6
-rw-r--r--tests/PHPUnit/Integration/JsProxyTest.php6
-rw-r--r--tests/PHPUnit/Integration/ReleaseCheckListTest.php9
-rw-r--r--tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php30
-rw-r--r--tests/PHPUnit/System/EnvironmentValidationTest.php10
-rw-r--r--tests/PHPUnit/System/TrackerTest.php4
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml4
-rw-r--r--tests/PHPUnit/Unit/DeprecatedMethodsTest.php1
-rw-r--r--tests/PHPUnit/proxy/matomo.php11
-rw-r--r--tests/PHPUnit/proxy/piwik.php2
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png4
-rw-r--r--tests/UI/expected-screenshots/QuickAccess_search_1.png4
-rw-r--r--tests/UI/expected-screenshots/QuickAccess_search_sites.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png4
-rw-r--r--tests/angularjs/Gruntfile.js2
-rw-r--r--tests/angularjs/bootstrap.js6
-rw-r--r--tests/javascript/content-fixtures/trackerInternals.html4
-rw-r--r--tests/javascript/index.php118
-rw-r--r--tests/javascript/matomo.php (renamed from tests/javascript/piwik.php)2
-rw-r--r--tests/javascript/matomotest.js (renamed from tests/javascript/piwiktest.js)0
-rw-r--r--tests/lib/screenshot-testing/support/app.js2
-rw-r--r--tests/resources/overlay-test-site/index.html4
-rw-r--r--tests/resources/overlay-test-site/page-1.html4
-rw-r--r--tests/resources/overlay-test-site/page-2.html4
-rw-r--r--tests/resources/overlay-test-site/page-3.html4
-rw-r--r--tests/resources/overlay-test-site/page-4.html4
-rw-r--r--tests/resources/overlay-test-site/page-5.html4
-rw-r--r--tests/resources/overlay-test-site/page-6.html4
-rw-r--r--tests/resources/test-download-outlink-page.txt10
38 files changed, 211 insertions, 137 deletions
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
index 0a9bf260de..c07967c563 100644
--- a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
+++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
@@ -266,7 +266,7 @@ class ManySitesImportedLogs extends Fixture
}
/**
- * Logs a couple visit using log entries that are tracking requests to a piwik.php file.
+ * Logs a couple visit using log entries that are tracking requests to a matomo.php file.
* Adds two visits to idSite=1 and two to non-existant sites.
*
* @param array $additonalOptions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index 701f5a1f70..45f200bac5 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -247,6 +247,7 @@ class Fixture extends \PHPUnit_Framework_Assert
Db::get()->query("SET wait_timeout=28800;");
DbHelper::createTables();
+ DbHelper::recordInstallVersion();
self::getPluginManager()->unloadPlugins();
@@ -410,6 +411,7 @@ class Fixture extends \PHPUnit_Framework_Assert
public static function loadAllPlugins(TestingEnvironmentVariables $testEnvironment = null, $testCaseClass = false, $extraPluginsToLoad = array())
{
DbHelper::createTables();
+ DbHelper::recordInstallVersion();
self::getPluginManager()->loadActivatedPlugins();
}
@@ -575,7 +577,7 @@ class Fixture extends \PHPUnit_Framework_Assert
*/
public static function getTrackerUrl()
{
- return self::getTestRootUrl() . 'piwik.php';
+ return self::getTestRootUrl() . 'matomo.php';
}
/**
diff --git a/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php b/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
index bf4e7f4c19..9e8b2abe07 100644
--- a/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
@@ -11,7 +11,9 @@ namespace Piwik\Tests\Framework\TestCase;
use Piwik\Access;
use Piwik\Config;
use Piwik\Db;
+use Piwik\DbHelper;
use Piwik\Menu\MenuAbstract;
+use Piwik\Option;
use Piwik\Tests\Framework\Fixture;
use Piwik\Cache as PiwikCache;
use Piwik\Tests\Framework\TestingEnvironmentVariables;
@@ -91,6 +93,7 @@ abstract class IntegrationTestCase extends SystemTestCase
PiwikCache::getEagerCache()->flushAll();
PiwikCache::getTransientCache()->flushAll();
MenuAbstract::clearMenus();
+ Option::clearCache();
}
/**
diff --git a/tests/PHPUnit/Integration/DbHelperTest.php b/tests/PHPUnit/Integration/DbHelperTest.php
index f8268f451c..5b88015eab 100644
--- a/tests/PHPUnit/Integration/DbHelperTest.php
+++ b/tests/PHPUnit/Integration/DbHelperTest.php
@@ -10,7 +10,9 @@ namespace Piwik\Tests\Integration;
use Piwik\Db;
use Piwik\DbHelper;
+use Piwik\Option;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
+use Piwik\Version;
class DbHelperTest extends IntegrationTestCase
{
@@ -22,6 +24,52 @@ class DbHelperTest extends IntegrationTestCase
DbHelper::dropDatabase('testdb');
}
+ public function test_getInstallVersion_isCurrentVersion()
+ {
+ $this->assertSame(Version::VERSION, DbHelper::getInstallVersion());
+ }
+
+ public function test_recordInstallVersion_setsCurrentVersion()
+ {
+ Option::delete(Db\Schema\Mysql::OPTION_NAME_MATOMO_INSTALL_VERSION);
+ $this->assertNull(DbHelper::getInstallVersion());
+
+ DbHelper::recordInstallVersion();
+ $this->assertSame(Version::VERSION, DbHelper::getInstallVersion());
+ }
+
+ public function test_recordInstallVersion_doesNotOverwritePreviouslySetVersion()
+ {
+ $this->setInstallVersion('2.1.0');
+ DbHelper::recordInstallVersion();
+ DbHelper::recordInstallVersion();
+ DbHelper::recordInstallVersion();
+ $this->assertSame('2.1.0', DbHelper::getInstallVersion());
+ }
+
+ public function test_wasMatomoInstalledBeforeVersion_sameVersion()
+ {
+ $this->setInstallVersion('2.1.0');
+ $this->assertFalse(DbHelper::wasMatomoInstalledBeforeVersion('2.1.0'));
+ }
+
+ public function test_wasMatomoInstalledBeforeVersion_whenUsedNewerVersion()
+ {
+ $this->setInstallVersion('2.1.0');
+ $this->assertFalse(DbHelper::wasMatomoInstalledBeforeVersion('2.0.0'));
+ }
+
+ public function test_wasMatomoInstalledBeforeVersion_whenWasInstalledBeforeThatVersion()
+ {
+ $this->setInstallVersion('2.1.0');
+ $this->assertTrue(DbHelper::wasMatomoInstalledBeforeVersion('2.2.0'));
+ }
+
+ private function setInstallVersion($version)
+ {
+ Option::set(Db\Schema\Mysql::OPTION_NAME_MATOMO_INSTALL_VERSION, $version);
+ }
+
public function test_createDatabase_escapesInputProperly()
{
$dbName = 'newdb`; create database anotherdb;`';
diff --git a/tests/PHPUnit/Integration/HttpTest.php b/tests/PHPUnit/Integration/HttpTest.php
index 1e9a734dc7..d7831f5021 100644
--- a/tests/PHPUnit/Integration/HttpTest.php
+++ b/tests/PHPUnit/Integration/HttpTest.php
@@ -35,8 +35,8 @@ class HttpTest extends \PHPUnit_Framework_TestCase
public function testFetchRemoteFile($method)
{
$this->assertNotNull(Http::getTransportMethod());
- $result = Http::sendHttpRequestBy($method, Fixture::getRootUrl() . 'piwik.js', 30);
- $this->assertTrue(strpos($result, 'Piwik') !== false);
+ $result = Http::sendHttpRequestBy($method, Fixture::getRootUrl() . 'matomo.js', 30);
+ $this->assertTrue(strpos($result, 'Matomo') !== false);
}
public function testFetchApiLatestVersion()
@@ -73,7 +73,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
$result = Http::sendHttpRequestBy(
$method,
- Fixture::getRootUrl() . '/piwik.js',
+ Fixture::getRootUrl() . '/matomo.js',
30,
$userAgent = null,
$destinationPath = null,
diff --git a/tests/PHPUnit/Integration/JsProxyTest.php b/tests/PHPUnit/Integration/JsProxyTest.php
index 17e2430401..c1ff170166 100644
--- a/tests/PHPUnit/Integration/JsProxyTest.php
+++ b/tests/PHPUnit/Integration/JsProxyTest.php
@@ -22,7 +22,7 @@ class JsProxyTest extends IntegrationTestCase
Fixture::createWebsite('2014-01-01 02:03:04');
}
- public function testPiwikJs()
+ public function testMatomoJs()
{
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $this->getStaticSrvUrl() . '/js/');
@@ -33,7 +33,7 @@ class JsProxyTest extends IntegrationTestCase
$this->assertEquals(200, $responseInfo["http_code"], 'Ok response');
- $piwik_js = file_get_contents(PIWIK_PATH_TEST_TO_ROOT . '/piwik.js');
+ $piwik_js = file_get_contents(PIWIK_PATH_TEST_TO_ROOT . '/matomo.js');
$this->assertEquals($piwik_js, $fullResponse, 'script content');
}
@@ -48,7 +48,7 @@ class JsProxyTest extends IntegrationTestCase
$this->assertEquals(200, $responseInfo["http_code"], 'Ok response');
- $piwikJs = file_get_contents(PIWIK_PATH_TEST_TO_ROOT . '/piwik.js');
+ $piwikJs = file_get_contents(PIWIK_PATH_TEST_TO_ROOT . '/matomo.js');
$piwikNoCommentJs = substr($piwikJs, strpos($piwikJs, "*/\n") + 3);
$this->assertEquals($piwikNoCommentJs, trim($fullResponse), 'script content (if comment shows, $byteStart value in /js/tracker.php)');
}
diff --git a/tests/PHPUnit/Integration/ReleaseCheckListTest.php b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
index bce8b56c24..0fb62a64c5 100644
--- a/tests/PHPUnit/Integration/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
@@ -492,6 +492,15 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase
);
}
+ public function test_piwikJs_SameAsMatomoJs()
+ {
+ $this->assertFileEquals(
+ PIWIK_DOCUMENT_ROOT . '/matomo.js',
+ PIWIK_DOCUMENT_ROOT . '/piwik.js',
+ '/piwik.js does not match /matomo.js, please re-generate the minified files using instructions in /js/README'
+ );
+ }
+
public function testTmpDirectoryContainsGitKeep()
{
$this->assertFileExists(PIWIK_DOCUMENT_ROOT . '/tmp/.gitkeep');
diff --git a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
index 3827303374..2e9ee543b3 100644
--- a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
+++ b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
@@ -57,13 +57,13 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik-server/piwik/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
-<noscript><p><img src="//piwik-server/piwik/piwik.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript>
+<noscript><p><img src="//piwik-server/piwik/matomo.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
";
@@ -84,10 +84,10 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['enableLinkTracking']);
(function() {
var u="//localhost/piwik/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
@@ -131,10 +131,10 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['enableLinkTracking']);
(function() {
var u="https://localhost/piwik/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
@@ -179,10 +179,10 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
(function() {
var u="//localhost/piwik/";
_paq.push(['setAPIUrl', 'http://localhost/statistics']);
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
@@ -214,12 +214,12 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['enableLinkTracking']);
(function() {
var u="//localhost/piwik/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
})();
</script>
-<script type='text/javascript' src="//localhost/piwik/piwik.js"></script>
+<script type='text/javascript' src="//localhost/piwik/matomo.js"></script>
<!-- End Matomo Code -->
";
@@ -257,10 +257,10 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push([\'enableLinkTracking\']);
(function() {
var u="//abc"def/";
- _paq.push([\'setTrackerUrl\', u+\'piwik.php\']);
+ _paq.push([\'setTrackerUrl\', u+\'matomo.php\']);
_paq.push([\'setSiteId\', \'1\']);
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
- g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'piwik.js\'; s.parentNode.insertBefore(g,s);
+ g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
@@ -284,10 +284,10 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push([\'enableLinkTracking\']);
(function() {
var u="https://localhost/piwik/";
- _paq.push([\'setTrackerUrl\', u+\'piwik.php\']);
+ _paq.push([\'setTrackerUrl\', u+\'matomo.php\']);
_paq.push([\'setSiteId\', \'1\']);
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
- g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'piwik.js\'; s.parentNode.insertBefore(g,s);
+ g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
diff --git a/tests/PHPUnit/System/EnvironmentValidationTest.php b/tests/PHPUnit/System/EnvironmentValidationTest.php
index 5c47714f4e..18aa3ab4ad 100644
--- a/tests/PHPUnit/System/EnvironmentValidationTest.php
+++ b/tests/PHPUnit/System/EnvironmentValidationTest.php
@@ -129,7 +129,7 @@ class EnvironmentValidationTest extends SystemTestCase
private function assertOutputContainsBadConfigFileError($output)
{
- $this->assertRegExp("/Unable to read INI file \\{.*\\/piwik.php\\}:/", $output);
+ $this->assertRegExp("/Unable to read INI file \\{.*\\/matomo.php\\}:/", $output);
$this->assertRegExp("/Your host may have disabled parse_ini_file\\(\\)/", $output);
}
@@ -158,11 +158,11 @@ class EnvironmentValidationTest extends SystemTestCase
$testingEnvironment = new \Piwik\Tests\Framework\TestingEnvironmentVariables();
if ($fileName == 'global.ini.php') {
- $testingEnvironment->configFileGlobal = PIWIK_INCLUDE_PATH . '/piwik.php';
+ $testingEnvironment->configFileGlobal = PIWIK_INCLUDE_PATH . '/matomo.php';
} else if ($fileName == 'common.config.ini.php') {
- $testingEnvironment->configFileCommon = PIWIK_INCLUDE_PATH . '/piwik.php';
+ $testingEnvironment->configFileCommon = PIWIK_INCLUDE_PATH . '/matomo.php';
} else {
- $testingEnvironment->configFileLocal = PIWIK_INCLUDE_PATH . '/piwik.php';
+ $testingEnvironment->configFileLocal = PIWIK_INCLUDE_PATH . '/matomo.php';
}
$testingEnvironment->save();
@@ -192,7 +192,7 @@ class EnvironmentValidationTest extends SystemTestCase
private function sendRequestToTracker()
{
- list($response, $info) = $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/piwik.php?idsite=1&rec=1&action_name=something');
+ list($response, $info) = $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/matomo.php?idsite=1&rec=1&action_name=something');
// Check Tracker requests return 200
$this->assertEquals(200, $info["http_code"], 'Ok response');
diff --git a/tests/PHPUnit/System/TrackerTest.php b/tests/PHPUnit/System/TrackerTest.php
index 7f43afbe2f..cc627d2cbf 100644
--- a/tests/PHPUnit/System/TrackerTest.php
+++ b/tests/PHPUnit/System/TrackerTest.php
@@ -224,7 +224,7 @@ class TrackerTest extends IntegrationTestCase
protected function issueBulkTrackingRequest($token_auth, $expectTrackingToSucceed)
{
- $piwikHost = Fixture::getRootUrl() . 'tests/PHPUnit/proxy/piwik.php';
+ $piwikHost = Fixture::getRootUrl() . 'tests/PHPUnit/proxy/matomo.php';
$command = 'curl -s -X POST -d \'{"requests":["?idsite=1&url=http://example.org&action_name=Test bulk log Pageview&rec=1","?idsite=1&url=http://example.net/test.htm&action_name=Another bulk page view&rec=1"],"token_auth":"' . $token_auth . '"}\' ' . $piwikHost;
@@ -251,7 +251,7 @@ class TrackerTest extends IntegrationTestCase
}
$ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, Fixture::getRootUrl() . 'tests/PHPUnit/proxy/piwik.php' . $url);
+ curl_setopt($ch, CURLOPT_URL, Fixture::getRootUrl() . 'tests/PHPUnit/proxy/matomo.php' . $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
index 2c0a7d1cf9..17afa1ddc3 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
@@ -7,10 +7,10 @@
_paq.push(['enableLinkTracking']);
(function() {
var u="//example.org/piwik/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
diff --git a/tests/PHPUnit/Unit/DeprecatedMethodsTest.php b/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
index a0cd9905f0..ff490fe6ab 100644
--- a/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
+++ b/tests/PHPUnit/Unit/DeprecatedMethodsTest.php
@@ -84,6 +84,7 @@ class DeprecatedMethodsTest extends \PHPUnit_Framework_TestCase
// THIS IS A REMINDER FOR PIWIK 4: We need to rename getColumnType() to getDbColumnType() and $columnType to $dbColumnType
$this->assertDeprecatedMethodIsRemovedInPiwik4('Piwik\Columns\Dimension', 'getType');
+ $this->assertDeprecatedMethodIsRemovedInPiwik4('Piwik\SettingsPiwik', 'isPiwikInstalled');
}
diff --git a/tests/PHPUnit/proxy/matomo.php b/tests/PHPUnit/proxy/matomo.php
new file mode 100644
index 0000000000..9a425e7d66
--- /dev/null
+++ b/tests/PHPUnit/proxy/matomo.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ * @package Piwik
+ */
+
+include __DIR__ . '/piwik.php'; \ No newline at end of file
diff --git a/tests/PHPUnit/proxy/piwik.php b/tests/PHPUnit/proxy/piwik.php
index db5bd8901c..64df843390 100644
--- a/tests/PHPUnit/proxy/piwik.php
+++ b/tests/PHPUnit/proxy/piwik.php
@@ -35,7 +35,7 @@ try {
\Piwik\Plugins\GeoIp2\LocationProvider\GeoIp2::$geoIPDatabaseDir = 'tests/lib/geoip-files';
- include PIWIK_INCLUDE_PATH . '/piwik.php';
+ include PIWIK_INCLUDE_PATH . '/matomo.php';
} catch (Exception $ex) {
echo "Unexpected error during tracking: " . $ex->getMessage() . "\n" . $ex->getTraceAsString() . "\n";
}
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
index 9d39cf1ae4..cb7362f5d3 100644
--- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cd393fef5bdc4a5599a5fa9c09844b97cc40777c29de18953bbcfee9e695318f
-size 256589
+oid sha256:3d70f20a9b025d311b498a3e196f5ef9f761433d43f395c015a6a6edb661e82d
+size 256556
diff --git a/tests/UI/expected-screenshots/QuickAccess_search_1.png b/tests/UI/expected-screenshots/QuickAccess_search_1.png
index a1375dd747..662ed3401a 100644
--- a/tests/UI/expected-screenshots/QuickAccess_search_1.png
+++ b/tests/UI/expected-screenshots/QuickAccess_search_1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e9312923e5c8621e7633084faed5b53e3d4a7bcfec7198365c6a772360f70828
-size 92297
+oid sha256:bed0c18d4596f6df9a99779a77a3ba547f9598940ff646f5bf4e763ddd24a244
+size 93312
diff --git a/tests/UI/expected-screenshots/QuickAccess_search_sites.png b/tests/UI/expected-screenshots/QuickAccess_search_sites.png
index 74654145f7..ccf80a5556 100644
--- a/tests/UI/expected-screenshots/QuickAccess_search_sites.png
+++ b/tests/UI/expected-screenshots/QuickAccess_search_sites.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a4b86fe6e1c50150f626b14242d4afc7fbaccedb86023a666bb83c7d2908d720
-size 39555
+oid sha256:b429ae6893b829de09cb7ddccecb032a67f7187cec8768a9600a3bbf93b7246a
+size 40546
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
index 528dedf6ef..da29f0d00a 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:581a3dbcca6c3771b387e4e557ba21653a2fb09d2175c44ae4129f31412b64bc
-size 4087434
+oid sha256:e524e9d92a5538ef3ec8a143875df9ff8074c4e06cb9d9a13187a6a596766410
+size 4079307
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
index ce7340fa2e..06315c1e0d 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:dc610bdf41ed85b618c07dfafc52cf92789e2fdff9dde8d1baf22190bf63fc2b
-size 388941
+oid sha256:f29b3b308c2cc58c52e53c74b2e382c829c427e6eeeb0349d683f08206e172c9
+size 389096
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
index 8e568bf31d..bb9f85998e 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:1111041dcb5e7c2ab84f3d8126a22cd90e97ea44e78285a81069603450b45fd5
-size 1044077
+oid sha256:b4adce722c2f48fbd883e5d142b13c425962122ac64d1817f27013fe6900408e
+size 1043948
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
index 19d702f642..f8bfdc6983 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:da509b58beab3825a9705262b055e658ef191749543e34d0d94025ae18029d59
-size 1045702
+oid sha256:6f7580dc36fbd3090a3b93dd1f5290059c358b31a6841ed8f39e19e414236e46
+size 1045534
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
index 7a7b0dd670..def09c3c19 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:186bdfac36d212eebb1e45267315d23c81f04e5da7ce75a8052a3f3772896b3e
-size 929802
+oid sha256:40192c9d43e4afe6c9e83559d6851c939415fe9dedbc1bfe3f58e4b6aec9c88d
+size 929225
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
index bc46e0199a..5c0ab4cb66 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e457fc12a138fed1195e5b23a4dd5156bad0f2846d3ad83bb0e7855a4f0f63a0
-size 4991621
+oid sha256:366c7a13712d0dbece1ebda33aea223a9989c9fe9c52b2526fa61df8cd8d2a2b
+size 4995235
diff --git a/tests/angularjs/Gruntfile.js b/tests/angularjs/Gruntfile.js
index 8dc577a407..9338a8aabc 100644
--- a/tests/angularjs/Gruntfile.js
+++ b/tests/angularjs/Gruntfile.js
@@ -34,7 +34,7 @@ module.exports = function(grunt) {
},
"shell": {
compilePiwikJs: {
- command: "sed '/<DEBUG>/,/<\\/DEBUG>/d' < piwik.js | sed 's/eval/replacedEvilString/' | java -jar yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar --type js --line-break 1000 | sed 's/replacedEvilString/eval/' | sed 's/^[/][*]/\\/*!/' > piwik-min.js && cp piwik-min.js ../piwik.js",
+ command: "sed '/<DEBUG>/,/<\\/DEBUG>/d' < piwik.js | sed 's/eval/replacedEvilString/' | java -jar yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar --type js --line-break 1000 | sed 's/replacedEvilString/eval/' | sed 's/^[/][*]/\\/*!/' > piwik-min.js && cp piwik-min.js ../piwik.js && cp piwik-min.js ../matomo.js",
options: {
execOptions: {
cwd: 'js'
diff --git a/tests/angularjs/bootstrap.js b/tests/angularjs/bootstrap.js
index 4b0ee79a10..8ae7d16bee 100644
--- a/tests/angularjs/bootstrap.js
+++ b/tests/angularjs/bootstrap.js
@@ -26,9 +26,9 @@ if(typeof(piwik_translations) == 'undefined') { var piwik_translations = new Obj
var piwikUsageTracking = {
targets: [
- {url: 'http://localhost/piwik.php', idSite: 1, cookieDomain: ''},
- {url: 'http://127.0.0.1/piwik.php', idSite: 20, cookieDomain: ''},
- {url: 'http://localhost/piwik.php', idSite: 33, cookieDomain: ''},
+ {url: 'http://localhost/matomo.php', idSite: 1, cookieDomain: ''},
+ {url: 'http://127.0.0.1/matomo.php', idSite: 20, cookieDomain: ''},
+ {url: 'http://localhost/matomo.php', idSite: 33, cookieDomain: ''},
],
visitorCustomVariables: [
{id: 1, name: 'Access', value: 'user'}
diff --git a/tests/javascript/content-fixtures/trackerInternals.html b/tests/javascript/content-fixtures/trackerInternals.html
index ee4494c65d..1f12ad9c38 100644
--- a/tests/javascript/content-fixtures/trackerInternals.html
+++ b/tests/javascript/content-fixtures/trackerInternals.html
@@ -39,7 +39,7 @@
<img src="http://www.example.com/path/xyz.jpg" data-content-piece="img.jpg" />
</a>
<!-- trackContentImpressionClickInteraction, if a link to tracker is already set we do not alter this link even if link is wrong -->
-<a id="ex111" href="piwik.php?xyz=makesnosense" data-track-content data-content-name="MyName">
+<a id="ex111" href="matomo.php?xyz=makesnosense" data-track-content data-content-name="MyName">
<img src="http://www.example.com/path/xyz.jpg" data-content-piece="img.jpg" />
</a>
<!-- trackContentImpressionClickInteraction, should be tracked as XHR as link within same page -->
@@ -68,7 +68,7 @@
</div>
-<a id="ex118" href="piwik.php?test=5" data-track-content>Link</a>
+<a id="ex118" href="matomo.php?test=5" data-track-content>Link</a>
<a id="ex119" href="#test" data-track-content>Link</a>
<a id="ex120" href="http://www.example.com" data-track-content>Link</a>
<a id="ex121" href="/download.pdf" class="download" data-track-content>Link</a>
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index f7670f71cf..287e781cc9 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -3,7 +3,7 @@
<html>
<head>
<meta charset="utf-8">
- <title>piwik.js: Unit Tests</title>
+ <title>matomo.js: Unit Tests</title>
<?php
$cacheBuster = md5(uniqid(mt_rand(), true));
@@ -24,7 +24,7 @@ try {
use \Piwik\Plugins\CustomPiwikJs\TrackerUpdater;
use \Piwik\Plugins\CustomPiwikJs\TrackingCode\JsTestPluginTrackerFiles;
-$targetFileName = '/tests/resources/piwik.test.js';
+$targetFileName = '/tests/resources/matomo.test.js';
$sourceFile = PIWIK_DOCUMENT_ROOT . TrackerUpdater::DEVELOPMENT_PIWIK_JS;
$targetFile = PIWIK_DOCUMENT_ROOT . $targetFileName;
@@ -63,7 +63,7 @@ function testCallingTrackPageViewBeforeSetTrackerUrlWorks() {
_paq.push(["setCustomData", { "token" : getToken() }]);
_paq.push(["trackPageView", "Asynchronous Tracker ONE"]);
_paq.push(["setSiteId", 1]);
- _paq.push(["setTrackerUrl", "piwik.php"]);
+ _paq.push(["setTrackerUrl", "matomo.php"]);
}
function testTrackPageViewAsync() {
@@ -80,7 +80,7 @@ testTrackPageViewAsync();
<script src="../lib/q-1.4.1/q.js" type="text/javascript"></script>
<script src="../..<?php echo $targetFileName ?>?rand=<?php echo $cacheBuster ?>" type="text/javascript"></script>
<script src="../../plugins/Overlay/client/urlnormalizer.js" type="text/javascript"></script>
- <script src="piwiktest.js" type="text/javascript"></script>
+ <script src="matomotest.js" type="text/javascript"></script>
<link rel="stylesheet" href="assets/qunit.css" type="text/css" media="screen" />
<link rel="stylesheet" href="jash/Jash.css" type="text/css" media="screen" />
@@ -274,7 +274,7 @@ function triggerEvent(element, type, buttonNumber) {
window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") :
null;
- xhr.open("GET", "piwik.php?requests=" + token, false);
+ xhr.open("GET", "matomo.php?requests=" + token, false);
xhr.send(null);
var response = xhr.responseText;
@@ -1846,31 +1846,31 @@ function PiwikTest() {
strictEqual(actual, undefined, 'nothing set');
actual = tracker.buildContentInteractionTrackingRedirectUrl('/path?a=b');
- assertTrackingRequest(actual, 'piwik.php?redirecturl=' + encodeWrapper(origin + '/path?a=b') + '&c_t=%2Fpath%3Fa%3Db',
+ assertTrackingRequest(actual, 'matomo.php?redirecturl=' + encodeWrapper(origin + '/path?a=b') + '&c_t=%2Fpath%3Fa%3Db',
'should build redirect url including domain when absolute path. Target should also fallback to passed url if not set');
actual = tracker.buildContentInteractionTrackingRedirectUrl('path?a=b');
- assertTrackingRequest(actual, 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('path?a=b') + '&c_t=path%3Fa%3Db',
+ assertTrackingRequest(actual, 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('path?a=b') + '&c_t=path%3Fa%3Db',
'should build redirect url including domain when relative path. Target should also fallback to passed url if not set');
actual = tracker.buildContentInteractionTrackingRedirectUrl('#test', 'click', 'name', 'piece', 'target');
- assertTrackingRequest(actual, 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('#test') + '&c_i=click&c_n=name&c_p=piece&c_t=target', 'all params set');
+ assertTrackingRequest(actual, 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('#test') + '&c_i=click&c_n=name&c_p=piece&c_t=target', 'all params set');
trackerUrl = tracker.getTrackerUrl();
- tracker.setTrackerUrl('piwik.php?test=1');
+ tracker.setTrackerUrl('matomo.php?test=1');
actual = tracker.buildContentInteractionTrackingRedirectUrl('#test', 'click', 'name', 'piece', 'target');
- assertTrackingRequest(actual, 'piwik.php?test=1&redirecturl=' + toEncodedAbsoluteUrl('#test') + '&c_i=click&c_n=name&c_p=piece&c_t=target', 'should use & if tracker url already contains question mark');
+ assertTrackingRequest(actual, 'matomo.php?test=1&redirecturl=' + toEncodedAbsoluteUrl('#test') + '&c_i=click&c_n=name&c_p=piece&c_t=target', 'should use & if tracker url already contains question mark');
- tracker.setTrackerUrl('piwik.php');
- actual = tracker.buildContentInteractionTrackingRedirectUrl('piwik.php?redirecturl=http://www.example.com', 'click', 'name', 'piece', 'target');
- strictEqual(actual, 'piwik.php?redirecturl=http://www.example.com', 'should return unmodified url if it is already a tracker url so users can set piwik.php link in href');
+ tracker.setTrackerUrl('matomo.php');
+ actual = tracker.buildContentInteractionTrackingRedirectUrl('matomo.php?redirecturl=http://www.example.com', 'click', 'name', 'piece', 'target');
+ strictEqual(actual, 'matomo.php?redirecturl=http://www.example.com', 'should return unmodified url if it is already a tracker url so users can set matomo.php link in href');
actual = tracker.buildContentInteractionTrackingRedirectUrl('http://www.example.com', 'click', 'name');
- assertTrackingRequest(actual, 'piwik.php?redirecturl=' + encodeWrapper('http://www.example.com') + '&c_i=click&c_n=name&c_t=http%3A%2F%2Fwww.example.com', 'should not change url if absolute');
+ assertTrackingRequest(actual, 'matomo.php?redirecturl=' + encodeWrapper('http://www.example.com') + '&c_i=click&c_n=name&c_t=http%3A%2F%2Fwww.example.com', 'should not change url if absolute');
actual = tracker.buildContentInteractionTrackingRedirectUrl(origin, 'something', 'name', undefined, 'target');
- assertTrackingRequest(actual, 'piwik.php?redirecturl=' + originEncoded + '&c_i=something&c_n=name&c_t=target', 'should not change url if same domain');
+ assertTrackingRequest(actual, 'matomo.php?redirecturl=' + originEncoded + '&c_i=something&c_n=name&c_t=target', 'should not change url if same domain');
tracker.setTrackerUrl(trackerUrl);
@@ -1938,7 +1938,7 @@ function PiwikTest() {
ok('test trackContentImpressionClickInteraction()');
trackerUrl = tracker.getTrackerUrl();
- tracker.setTrackerUrl('piwik.php');
+ tracker.setTrackerUrl('matomo.php');
tracker.disableLinkTracking();
ok(_s('#ignoreInteraction1') && _s('#ex108') && _s('#ex109'), 'make sure node exists otherwise test is useless');
@@ -1951,15 +1951,15 @@ function PiwikTest() {
assertTrackingRequest(actual, 'c_i=click&c_n=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_p=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_t=http%3A%2F%2Fad.example.com', 'trackContentImpressionClickInteraction, is outlink but should use xhr as link tracking not enabled');
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex109')))({target: _s('#ex109')});
strictEqual(actual, 'href', 'trackContentImpressionClickInteraction, is internal download but should use href as link tracking not enabled');
- assertTrackingRequest($(_s('#ex109')).attr('href'), 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('/file.pdf') + '&c_i=click&c_n=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_p=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Ffile.pdf', 'trackContentImpressionClickInteraction, the href download link should be replaced with a redirect link to tracker');
+ assertTrackingRequest($(_s('#ex109')).attr('href'), 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('/file.pdf') + '&c_i=click&c_n=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_p=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Ffile.pdf', 'trackContentImpressionClickInteraction, the href download link should be replaced with a redirect link to tracker');
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex110')))({target: _s('#ex110')});
strictEqual(actual, 'href', 'trackContentImpressionClickInteraction, should be tracked using redirect');
- assertTrackingRequest($(_s('#ex110')).attr('href'), 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('/example') + '&c_i=click&c_n=MyName&c_p=img.jpg&c_t=' + originEncoded + '%2Fexample', 'trackContentImpressionClickInteraction, the href link should be replaced with a redirect link to tracker');
+ assertTrackingRequest($(_s('#ex110')).attr('href'), 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('/example') + '&c_i=click&c_n=MyName&c_p=img.jpg&c_t=' + originEncoded + '%2Fexample', 'trackContentImpressionClickInteraction, the href link should be replaced with a redirect link to tracker');
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex111')))({target: _s('#ex111')});
strictEqual(actual, 'href', 'trackContentImpressionClickInteraction, should detect it is a link to same page');
- strictEqual($(_s('#ex111')).attr('href'), 'piwik.php?xyz=makesnosense', 'trackContentImpressionClickInteraction, a tracking link should not be changed');
+ strictEqual($(_s('#ex111')).attr('href'), 'matomo.php?xyz=makesnosense', 'trackContentImpressionClickInteraction, a tracking link should not be changed');
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex112')))({target: _s('#ex112')});
assertTrackingRequest(actual, 'c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=' + toEncodedAbsoluteUrl('#example'), 'trackContentImpressionClickInteraction, a link that is an anchor should be tracked as XHR and no redirect');
@@ -1974,7 +1974,7 @@ function PiwikTest() {
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex108')))({target: _s('#ex108')});
strictEqual(actual, 'link', 'trackContentImpressionClickInteraction, should not track as is an outlink and link tracking enabled');
- $(_s('#ex109')).attr('href', '/file.pdf'); // reset download link as was replaced with piwik.php
+ $(_s('#ex109')).attr('href', '/file.pdf'); // reset download link as was replaced with matomo.php
actual = (tracker.trackContentImpressionClickInteraction(_s('#ex109')))({target: _s('#ex109')});
strictEqual(actual, 'download', 'trackContentImpressionClickInteraction, should not track as is a download and link tracking enabled');
@@ -2069,20 +2069,20 @@ function PiwikTest() {
ok('test replaceHrefIfInternalLink()')
var trackerUrl = tracker.getTrackerUrl();
- tracker.setTrackerUrl('piwik.php');
+ tracker.setTrackerUrl('matomo.php');
strictEqual(tracker.replaceHrefIfInternalLink(), false, 'no content node set');
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex117')), false, 'should be ignored');
$(_s('#ignoreInternalLink')).removeClass('piwikContentIgnoreInteraction'); // now it should be no longer ignored and as it is an intenral link replaced
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex117')), true, 'should be replaced as is internal link');
- assertTrackingRequest($(_s('#ignoreInternalLink')).attr('href'), 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('/internallink') + '&c_i=click&c_n=Unknown&c_p=Unknown&c_t=' + originEncoded + '%2Finternallink', 'internal link should be replaced');
+ assertTrackingRequest($(_s('#ignoreInternalLink')).attr('href'), 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('/internallink') + '&c_i=click&c_n=Unknown&c_p=Unknown&c_t=' + originEncoded + '%2Finternallink', 'internal link should be replaced');
strictEqual($(_s('#ignoreInternalLink')).attr('data-content-target'), origin + '/internallink', 'we need to set data-content-target when link is set otherwise a replace would not be found');
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex122')), true, 'should be replaced');
strictEqual($(_s('#replacedLinkWithTarget')).attr('data-content-target'), '/test', 'should replace href but not a data-content-target if already exists');
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex118')), true, 'should not replace already replaced link');
- strictEqual($(_s('#ex118')).attr('href'), 'piwik.php?test=5', 'link should not be replaced');
+ strictEqual($(_s('#ex118')).attr('href'), 'matomo.php?test=5', 'link should not be replaced');
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex119')), false, 'anchor link should not be replaced');
strictEqual($(_s('#ex119')).attr('href'), '#test', 'link should not replace anchor link');
@@ -2091,7 +2091,7 @@ function PiwikTest() {
strictEqual($(_s('#ex120')).attr('href'), 'http://www.example.com', 'should not replace external link');
strictEqual(tracker.replaceHrefIfInternalLink(_s('#ex121')), true, 'should replace download link if link tracking not enabled');
- assertTrackingRequest($(_s('#ex121')).attr('href'), 'piwik.php?redirecturl=' + toEncodedAbsoluteUrl('/download.pdf') + '&c_i=click&c_n=Unknown&c_p=Unknown&c_t=' + originEncoded + '%2Fdownload.pdf', 'should replace download link as link tracking disabled');
+ assertTrackingRequest($(_s('#ex121')).attr('href'), 'matomo.php?redirecturl=' + toEncodedAbsoluteUrl('/download.pdf') + '&c_i=click&c_n=Unknown&c_p=Unknown&c_t=' + originEncoded + '%2Fdownload.pdf', 'should replace download link as link tracking disabled');
$(_s('#ex121')).attr('href', '/download.pdf'); // reset link
tracker.enableLinkTracking();
@@ -2510,7 +2510,7 @@ function PiwikTest() {
equal( typeof tracker.hook.test._titleFixup, 'function', 'titleFixup' );
equal( tracker.hook.test._titleFixup( 'hello' ), 'hello', 'hello string' );
- equal( tracker.hook.test._titleFixup( document.title ), 'piwik.js: Unit Tests', 'hello string' );
+ equal( tracker.hook.test._titleFixup( document.title ), 'matomo.js: Unit Tests', 'hello string' );
equal( typeof tracker.hook.test._purify, 'function', 'purify' );
@@ -3048,7 +3048,7 @@ function PiwikTest() {
expect(4);
var tracker = Piwik.getTracker();
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
tracker.setSiteId(1);
cookieName = tracker.hook.test._getCookieName('testing');
@@ -3139,20 +3139,20 @@ function PiwikTest() {
tracker.setDownloadClasses([]);
tracker.setLinkClasses([]);
- equal( tracker.hook.test._getLinkType('something', 'piwik.php', false), 'link', 'an empty tracker url should not match configtrackerurl' );
+ equal( tracker.hook.test._getLinkType('something', 'matomo.php', false), 'link', 'an empty tracker url should not match configtrackerurl' );
runTests('without tracker url, ');
- tracker.setTrackerUrl('piwik.php');
+ tracker.setTrackerUrl('matomo.php');
tracker.setDownloadClasses([]);
tracker.setLinkClasses([]);
tracker.setDownloadExtensions(downloadExtensions);
runTests('with tracker url, ');
- equal( tracker.hook.test._getLinkType('something', 'piwik.php', true, false), 0, 'matches tracker url and should never return any tracker Url' );
- equal( tracker.hook.test._getLinkType('something', 'piwik.php?redirecturl=http://example.com/test.pdf', true, false), 0, 'should not match download as is config tracker url' );
- equal( tracker.hook.test._getLinkType('something', 'piwik.php?redirecturl=http://example.com/', true, false), 0, 'should not match link as is config tracker url' );
+ equal( tracker.hook.test._getLinkType('something', 'matomo.php', true, false), 0, 'matches tracker url and should never return any tracker Url' );
+ equal( tracker.hook.test._getLinkType('something', 'matomo.php?redirecturl=http://example.com/test.pdf', true, false), 0, 'should not match download as is config tracker url' );
+ equal( tracker.hook.test._getLinkType('something', 'matomo.php?redirecturl=http://example.com/', true, false), 0, 'should not match link as is config tracker url' );
tracker.setTrackerUrl(trackerUrl);
});
@@ -3486,13 +3486,13 @@ function PiwikTest() {
equal( getPiwikUrlForOverlay('http://www.example.com/tracker.php?version=232323'), 'http://www.example.com/', 'with query and no js folder' );
equal( getPiwikUrlForOverlay('http://www.example.com/js/tracker.php'), 'http://www.example.com/', 'no query, custom tracker and js folder' );
equal( getPiwikUrlForOverlay('http://www.example.com/tracker.php'), 'http://www.example.com/', 'no query, custom tracker and no js folder' );
- equal( getPiwikUrlForOverlay('http://www.example.com/js/piwik.php'), 'http://www.example.com/', 'with piwik.php and no js folder' );
- equal( getPiwikUrlForOverlay('http://www.example.com/piwik.php'), 'http://www.example.com/', 'with piwik.php and no js folder' );
- equal( getPiwikUrlForOverlay('http://www.example.com/master/js/piwik.php'), 'http://www.example.com/master/', 'installed in custom folder and js folder' );
- equal( getPiwikUrlForOverlay('http://www.example.com/master/piwik.php'), 'http://www.example.com/master/', 'installed in custom folder and no js folder' );
- equal( getPiwikUrlForOverlay('/piwik.php'), toAbsoluteUrl('/'), 'only piwik.php with leading slash' );
- equal( getPiwikUrlForOverlay('piwik.php'), toAbsoluteUrl(''), 'only piwik.php' );
- equal( getPiwikUrlForOverlay('/piwik.php?version=1234'), toAbsoluteUrl('/'), 'only piwik.php with leading slash with query' );
+ equal( getPiwikUrlForOverlay('http://www.example.com/js/matomo.php'), 'http://www.example.com/', 'with matomo.php and no js folder' );
+ equal( getPiwikUrlForOverlay('http://www.example.com/matomo.php'), 'http://www.example.com/', 'with matomo.php and no js folder' );
+ equal( getPiwikUrlForOverlay('http://www.example.com/master/js/matomo.php'), 'http://www.example.com/master/', 'installed in custom folder and js folder' );
+ equal( getPiwikUrlForOverlay('http://www.example.com/master/matomo.php'), 'http://www.example.com/master/', 'installed in custom folder and no js folder' );
+ equal( getPiwikUrlForOverlay('/matomo.php'), toAbsoluteUrl('/'), 'only matomo.php with leading slash' );
+ equal( getPiwikUrlForOverlay('matomo.php'), toAbsoluteUrl(''), 'only matomo.php' );
+ equal( getPiwikUrlForOverlay('/matomo.php?version=1234'), toAbsoluteUrl('/'), 'only matomo.php with leading slash with query' );
});
function generateAnIframeInDocument() {
@@ -3504,7 +3504,7 @@ function PiwikTest() {
var html = '\
<html><body> \
<scr' + 'ipt src="' + hostAndPath + '../../js/piwik.js?rand=<?php echo $cacheBuster; ?>" type="text/javascript"></sc' + 'ript> \
- <scr' + 'ipt src="' + hostAndPath + 'piwiktest.js" type="text/javascript"></sc' + 'ript> \
+ <scr' + 'ipt src="' + hostAndPath + 'matomotest.js" type="text/javascript"></sc' + 'ript> \
<scr' + 'ipt src="' + hostAndPath + '../../libs/bower_components/jquery/dist/jquery.min.js" type="text/javascript"></sc' + 'ript> \
<scr' + 'ipt type="text/javascript"> \
window.onload = function() { \
@@ -3591,7 +3591,7 @@ if ($mysql) {
};
var tracker = Piwik.getTracker();
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
tracker.setSiteId(1);
strictEqual(0, tracker.getNumTrackedPageViews(), 'getNumTrackedPageViews, is zero by default');
@@ -3602,19 +3602,19 @@ if ($mysql) {
}
equal(tracker.getPiwikUrl(), piwikUrl, "getPiwikUrl, relative tracker url" );
- tracker.setTrackerUrl("http://apache.piwik/piwik.php");
+ tracker.setTrackerUrl("http://apache.piwik/matomo.php");
equal(tracker.getPiwikUrl(), 'http://apache.piwik/', "getPiwikUrl, in root directory" );
tracker.setTrackerUrl("http://apache.piwik/tracker.php");
equal(tracker.getPiwikUrl(), 'http://apache.piwik/', "getPiwikUrl, with different file name" );
- tracker.setTrackerUrl("http://apache.piwik/tests/javascript/piwik.php?x=1");
+ tracker.setTrackerUrl("http://apache.piwik/tests/javascript/matomo.php?x=1");
equal(tracker.getPiwikUrl(), 'http://apache.piwik/tests/javascript/', "getPiwikUrl, with path and query" );
- tracker.setTrackerUrl("http://apache.piwik/js/piwik.php?x=1");
+ tracker.setTrackerUrl("http://apache.piwik/js/matomo.php?x=1");
equal(tracker.getPiwikUrl(), 'http://apache.piwik/', "getPiwikUrl, when using unminified piwik.js" );
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
var thirteenMonths = 1000 * 60 * 60 * 24 * 393;
strictEqual(thirteenMonths, tracker.getConfigVisitorCookieTimeout(), 'default visitor timeout should be 13 months');
@@ -3750,7 +3750,7 @@ if ($mysql) {
tracker.setRequestMethod("POST");
tracker.trackGoal(42, 69, { "token" : getToken(), "boy" : "Michael", "girl" : "Mandy"});
- piwik_log("CompatibilityLayer", 1, "piwik.php", { "token" : getToken() });
+ piwik_log("CompatibilityLayer", 1, "matomo.php", { "token" : getToken() });
tracker.hook.test._addEventListener(_e("click8"), "click", stopEvent);
triggerEvent(_e("click8"), 'click');
@@ -3866,7 +3866,7 @@ if ($mysql) {
tracker.trackPageView("MultipleCategories");
var tracker2 = Piwik.getTracker();
- tracker2.setTrackerUrl("piwik.php");
+ tracker2.setTrackerUrl("matomo.php");
tracker2.setSiteId(1);
tracker2.storeCustomVariablesInCookie();
tracker2.setCustomData({ "token" : getToken() });
@@ -3883,7 +3883,7 @@ if ($mysql) {
tracker2.trackPageView("DeleteCustomVariableCookie");
var tracker3 = Piwik.getTracker();
- tracker3.setTrackerUrl("piwik.php");
+ tracker3.setTrackerUrl("matomo.php");
tracker3.setSiteId(1);
tracker3.setCustomData({ "token" : getToken() });
tracker3.setCookieNamePrefix("PREFIX");
@@ -3977,7 +3977,7 @@ if ($mysql) {
stop();
setTimeout(function() {
- xhr.open("GET", "piwik.php?requests=" + getToken(), false);
+ xhr.open("GET", "matomo.php?requests=" + getToken(), false);
xhr.send(null);
results = xhr.responseText;
equal( (/<span\>([0-9]+)\<\/span\>/.exec(results))[1], "40", "count tracking events" );
@@ -3987,7 +3987,7 @@ if ($mysql) {
// tracking requests
ok( /PiwikTest/.test( results ), "trackPageView(), setDocumentTitle()" );
- ok( results.indexOf("tests/javascript/piwik.php?action_name=Asynchronous%20Tracker%20ONE&idsite=1&rec=1") >= 0 , "async trackPageView() called before setTrackerUrl() should work" );
+ ok( results.indexOf("tests/javascript/matomo.php?action_name=Asynchronous%20Tracker%20ONE&idsite=1&rec=1") >= 0 , "async trackPageView() called before setTrackerUrl() should work" );
ok( /Asynchronous%20tracking%20TWO/.test( results ), "async trackPageView() called after another trackPageView()" );
ok( /CustomTitleTest/.test( results ), "trackPageView(customTitle)" );
ok( results.indexOf('&pv_id=' + idPageview) !== -1, "trackPageView, configPageId should be sent along requests" );
@@ -4083,8 +4083,8 @@ if ($mysql) {
ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D34343%3A44%3A12&e_n=Uncaught%20Error%3A%20The%20message&idsite=1/.test( results ), "enableJSErrorTracking() function with predefined onerror event");
ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D3kfkf%3A45&e_n=Second%20Error%3A%20With%20less%20data&idsite=1/.test( results ), "enableJSErrorTracking() function without predefined onerror event and less parameters");
- ok( /piwik.php\?action_name=twoTrackers&idsite=1&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
- ok( /piwik.php\?action_name=twoTrackers&idsite=13&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
+ ok( /matomo.php\?action_name=twoTrackers&idsite=1&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
+ ok( /matomo.php\?action_name=twoTrackers&idsite=13&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
start();
}, 5000);
@@ -4097,7 +4097,7 @@ if ($mysql) {
var tokenBase = getHeartbeatToken();
var tracker = Piwik.getTracker();
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
tracker.setSiteId(1);
tracker.enableHeartBeatTimer(3);
@@ -4186,7 +4186,7 @@ if ($mysql) {
message += ', ';
}
- expectedStartsWith = '<span>' + toAbsolutePath('piwik.php') + '?' + expectedStartsWith;
+ expectedStartsWith = '<span>' + toAbsolutePath('matomo.php') + '?' + expectedStartsWith;
strictEqual(actual.indexOf(expectedStartsWith), 0, message + actual + ' should start with ' + expectedStartsWith);
strictEqual(actual.indexOf('&idsite=1&rec=1'), expectedStartsWith.length);
@@ -4203,7 +4203,7 @@ if ($mysql) {
var token = getContentToken();
var tracker = Piwik.getTracker();
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
tracker.setSiteId(1);
resetTracker(tracker, token);
@@ -4620,7 +4620,7 @@ if ($mysql) {
message += ', ';
}
- expectedStartsWith = '<span>' + toAbsolutePath('piwik.php') + '?' + expectedStartsWith;
+ expectedStartsWith = '<span>' + toAbsolutePath('matomo.php') + '?' + expectedStartsWith;
strictEqual(actual.indexOf(expectedStartsWith), 0, message + actual + ' should start with ' + expectedStartsWith);
strictEqual(actual.indexOf('&idsite=1&rec=1'), expectedStartsWith.length);
@@ -4645,7 +4645,7 @@ if ($mysql) {
var actual, expected, trackerUrl;
var tracker = Piwik.getTracker();
- tracker.setTrackerUrl("piwik.php");
+ tracker.setTrackerUrl("matomo.php");
tracker.setSiteId(1);
resetTracker(tracker, token);
@@ -4694,7 +4694,7 @@ if ($mysql) {
var token5 = '5' + token;
resetTracker(tracker, token5);
preventClickDefault('#internalLink');
- var expectedLink = toAbsoluteUrl('piwik.php') + '?redirecturl=' + toEncodedAbsoluteUrl('/anylink5') + '&c_i=click&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5&idsite=1&rec=1';
+ var expectedLink = toAbsoluteUrl('matomo.php') + '?redirecturl=' + toEncodedAbsoluteUrl('/anylink5') + '&c_i=click&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5&idsite=1&rec=1';
var newHref = _s('#internalLink').href;
strictEqual(0, newHref.indexOf(expectedLink), 'replaced href is replaced: ' + newHref); // make sure was already replace by trackContentImpressions()
strictEqual(_s('#internalLink').wasContentTargetAttrReplaced, true, 'has to be marked as replaced so we know we have to update content target again in case the url changes meanwhile');
@@ -4705,7 +4705,7 @@ if ($mysql) {
triggerEvent(_s('#internalLink'), 'click'); // should replace href php
newHref = _s('#internalLink').href;
- expectedLink = toAbsoluteUrl('piwik.php') + '?redirecturl=' + toEncodedAbsoluteUrl('/newlink') + '&c_i=click&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fnewlink&idsite=1&rec=1';
+ expectedLink = toAbsoluteUrl('matomo.php') + '?redirecturl=' + toEncodedAbsoluteUrl('/newlink') + '&c_i=click&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fnewlink&idsite=1&rec=1';
strictEqual(0, newHref.indexOf(expectedLink), 'replaced href2 is replaced again: ' + newHref); // make sure was already replace by trackContentImpressions()
wait(300);
@@ -4920,7 +4920,7 @@ function customAddEventListener(element, eventType, eventHandler, useCapture) {
<?php
include_once $root . '/core/Filesystem.php';
- $files = \Piwik\Filesystem::globr($root . '/plugins/*/tests/javascript', 'index.php');
+ $files = \Piwik\Filesystem::globr($root . '/plugins/foo/tests/javascript', 'index.php');
foreach ($files as $file) {
include_once $file;
}
diff --git a/tests/javascript/piwik.php b/tests/javascript/matomo.php
index 20f7c41aa4..536b915d0b 100644
--- a/tests/javascript/piwik.php
+++ b/tests/javascript/matomo.php
@@ -1,5 +1,5 @@
<?php
-// piwik.php test harness
+// matomo.php test harness
if (!defined('PIWIK_DOCUMENT_ROOT')) {
define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) . '/../..');
diff --git a/tests/javascript/piwiktest.js b/tests/javascript/matomotest.js
index 514d1c5c8c..514d1c5c8c 100644
--- a/tests/javascript/piwiktest.js
+++ b/tests/javascript/matomotest.js
diff --git a/tests/lib/screenshot-testing/support/app.js b/tests/lib/screenshot-testing/support/app.js
index 67d4464b1f..e7161c65b5 100644
--- a/tests/lib/screenshot-testing/support/app.js
+++ b/tests/lib/screenshot-testing/support/app.js
@@ -229,7 +229,7 @@ Application.prototype.doRunTests = function () {
this.runner = mocha.run(function () {
// remove symlinks
if (!options['keep-symlinks']) {
- var symlinks = ['libs', 'plugins', 'tests', 'misc', 'piwik.js'];
+ var symlinks = ['libs', 'plugins', 'tests', 'misc', 'piwik.js', 'matomo.js'];
symlinks.forEach(function (item) {
var file = path.join(uiTestsDir, '..', 'PHPUnit', 'proxy', item);
diff --git a/tests/resources/overlay-test-site/index.html b/tests/resources/overlay-test-site/index.html
index 9d2673a425..2b1f099263 100644
--- a/tests/resources/overlay-test-site/index.html
+++ b/tests/resources/overlay-test-site/index.html
@@ -81,12 +81,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-1.html b/tests/resources/overlay-test-site/page-1.html
index 47ef313d3a..16330c63a8 100644
--- a/tests/resources/overlay-test-site/page-1.html
+++ b/tests/resources/overlay-test-site/page-1.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-2.html b/tests/resources/overlay-test-site/page-2.html
index b2671380f4..43f08ee61f 100644
--- a/tests/resources/overlay-test-site/page-2.html
+++ b/tests/resources/overlay-test-site/page-2.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-3.html b/tests/resources/overlay-test-site/page-3.html
index 361b3afece..a53f07050e 100644
--- a/tests/resources/overlay-test-site/page-3.html
+++ b/tests/resources/overlay-test-site/page-3.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-4.html b/tests/resources/overlay-test-site/page-4.html
index 72c5f7aee7..8341fc48c7 100644
--- a/tests/resources/overlay-test-site/page-4.html
+++ b/tests/resources/overlay-test-site/page-4.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-5.html b/tests/resources/overlay-test-site/page-5.html
index 5b9ac655ed..e8806b0d68 100644
--- a/tests/resources/overlay-test-site/page-5.html
+++ b/tests/resources/overlay-test-site/page-5.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/overlay-test-site/page-6.html b/tests/resources/overlay-test-site/page-6.html
index ed2c35dd76..1dbe72c1a8 100644
--- a/tests/resources/overlay-test-site/page-6.html
+++ b/tests/resources/overlay-test-site/page-6.html
@@ -78,12 +78,12 @@
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "matomo.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
var pkBaseURL = (("https:" == document.location.protocol) ? "https://%trackerBaseUrl%" : "http://%trackerBaseUrl%");
try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "matomo.php", 3);
piwikTracker.setCookieDomain('*.piwik.org');
piwikTracker.trackPageView();
diff --git a/tests/resources/test-download-outlink-page.txt b/tests/resources/test-download-outlink-page.txt
index 4ad8d83200..fc7ee23c61 100644
--- a/tests/resources/test-download-outlink-page.txt
+++ b/tests/resources/test-download-outlink-page.txt
@@ -1,8 +1,8 @@
downloads
-piwik.php?idsite=1&download=http%3A//forum.piwik.org/mma mai ****/test.zip&rand=0.10591157392713457&redirect=0&name=my outlink name
-piwik.php?idsite=1&download=http%3A//forum.piwik.org/test.zip&rand=0.10591157392713457&redirect=0
+matomo.php?idsite=1&download=http%3A//forum.piwik.org/mma mai ****/test.zip&rand=0.10591157392713457&redirect=0&name=my outlink name
+matomo.php?idsite=1&download=http%3A//forum.piwik.org/test.zip&rand=0.10591157392713457&redirect=0
outlinks
-piwik.php?idsite=1&link=http%3A//www.example.org2/subcategory/subpage/&rand=0.10591157392713457&redirect=0
-piwik.php?idsite=1&link=http%3A//example.org/subcategory/latest.zip/test/&rand=0.10591157392713457&redirect=0
-piwik.php?idsite=1&link=mailto%3Atest@test.com&rand=0.15968200434074042&redirect=0
+matomo.php?idsite=1&link=http%3A//www.example.org2/subcategory/subpage/&rand=0.10591157392713457&redirect=0
+matomo.php?idsite=1&link=http%3A//example.org/subcategory/latest.zip/test/&rand=0.10591157392713457&redirect=0
+matomo.php?idsite=1&link=mailto%3Atest@test.com&rand=0.15968200434074042&redirect=0