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:
Diffstat (limited to 'tests/javascript/index.php')
-rw-r--r--tests/javascript/index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index becba7bb63..d8c7ae33e5 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -265,7 +265,7 @@ $(document).ready(function () {
});
test("Tracking", function() {
- expect(<?php echo $sqlite ? 12 : 3; ?>);
+ expect(<?php echo $sqlite ? 14 : 3; ?>);
var tracker = Piwik.getTracker();
@@ -296,6 +296,8 @@ if ($sqlite) {
tracker.trackPageView();
+ tracker.trackPageView("CustomTitleTest");
+
tracker.trackLink("http://example.ca", "link", { "token" : "'. $token .'" });
var buttons = new Array("click1", "click2", "click3", "click4", "click5", "click6", "click7");
@@ -305,14 +307,17 @@ if ($sqlite) {
tracker.trackGoal(42, 69, { "boy" : "Michael", "girl" : "Mandy" });
+ piwik_log("CompatibilityLayer", 1, "piwik.php", {"token":"'. $token .'"});
+
stop();
setTimeout(function() {
jQuery.ajax({
url: url("piwik.php?results='. $token .'"),
success: function(results) {
//alert(results);
- ok( /\<span\>7\<\/span\>/.test( results ), "count tracking events" );
+ ok( /\<span\>9\<\/span\>/.test( results ), "count tracking events" );
ok( /PiwikTest/.test( results ), "trackPageView()" );
+ ok( /CustomTitleTest/.test( results ), "trackPageView(customTitle)" );
ok( /example.ca/.test( results ), "trackLink()" );
ok( /example.net/.test( results ), "click: implicit outlink (by outbound URL)" );
ok( /example.html/.test( results ), "click: explicit outlink" );
@@ -320,6 +325,7 @@ if ($sqlite) {
ok( /example.word/.test( results ), "click: explicit download" );
ok( ! /example.(org|php)/.test( results ), "click: ignored" );
ok( /idgoal=42.*?revenue=69.*?Michael.*?Mandy/.test( results ), "trackGoal()" );
+ ok( /CompatibilityLayer/.test( results ), "piwik_log(): compatibility layer" );
start();
}