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:
authorThomas Steur <thomas.steur@gmail.com>2015-11-04 05:30:26 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-11-24 04:04:01 +0300
commitd995029b91f38bd81fbbb50f4d058f3b6b3c18a2 (patch)
tree3ba63b979bde2da095ddb06bb66fe92b2d72c31b /tests/PHPUnit/System
parentf9c851190ed680eb430d9d52040b72c7cf73f62a (diff)
refs #9129 added feature Custom Dimensions
Diffstat (limited to 'tests/PHPUnit/System')
-rw-r--r--tests/PHPUnit/System/BackwardsCompatibility1XTest.php2
-rw-r--r--tests/PHPUnit/System/TrackerTest.php7
-rw-r--r--tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableExtractionDimensions.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableScopes.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getConfiguredCustomDimensions.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableExtractionDimensions.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableScopes.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getConfiguredCustomDimensions.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableExtractionDimensions.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableScopes.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getConfiguredCustomDimensions.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableExtractionDimensions.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableScopes.xml15
-rw-r--r--tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getConfiguredCustomDimensions.xml2
16 files changed, 135 insertions, 6 deletions
diff --git a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
index 74dbb05d73..12a60f3821 100644
--- a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
+++ b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
@@ -13,6 +13,7 @@ use Piwik\Plugins\VisitFrequency\API as VisitFrequencyApi;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
use Piwik\Tests\Fixtures\SqlDump;
use Piwik\Tests\Framework\Fixture;
+use Piwik\Tests\Framework\TestingEnvironmentVariables;
/**
* Tests that Piwik 2.0 works w/ data from Piwik 1.12.
@@ -32,6 +33,7 @@ class BackwardsCompatibility1XTest extends SystemTestCase
// note: not sure why I have to manually install plugin
\Piwik\Plugin\Manager::getInstance()->loadPlugin('CustomAlerts')->install();
+ \Piwik\Plugin\Manager::getInstance()->loadPlugin('CustomDimensions')->install();
$result = Fixture::updateDatabase();
if ($result === false) {
diff --git a/tests/PHPUnit/System/TrackerTest.php b/tests/PHPUnit/System/TrackerTest.php
index 461b0a2385..417b40f72a 100644
--- a/tests/PHPUnit/System/TrackerTest.php
+++ b/tests/PHPUnit/System/TrackerTest.php
@@ -180,9 +180,7 @@ class TrackerTest extends IntegrationTestCase
public function test_scheduledTasks_CanBeRunThroughTracker_WithOutputIncluded_IfDebugQueryParamUsed()
{
$environment = $this->setScheduledTasksToRunInTracker();
- $config = $environment->configOverride;
- $config['log']['log_writers'] = array('screen');
- $environment->configOverride = $config;
+ $environment->overrideConfig('log', 'log_writers', array('screen'));
$environment->save();
$urlToTest = $this->getSimpleTrackingUrl() . '&debug=1';
@@ -298,7 +296,8 @@ class TrackerTest extends IntegrationTestCase
$testingEnvironment = new \Piwik\Tests\Framework\TestingEnvironmentVariables();
$testingEnvironment->testCaseClass = 'Piwik\Tests\System\TrackerTest';
$testingEnvironment->addScheduledTask = true;
- $testingEnvironment->configOverride = array('Tracker' => array('scheduled_tasks_min_interval' => 1, 'debug_on_demand' => 1));
+ $testingEnvironment->overrideConfig('Tracker', array('scheduled_tasks_min_interval' => 1, 'debug_on_demand' => 1));
+ $testingEnvironment->overrideConfig('log', array());
$testingEnvironment->save();
return $testingEnvironment;
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableExtractionDimensions.xml b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableExtractionDimensions.xml
new file mode 100644
index 0000000000..7a397597a0
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableExtractionDimensions.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <value>url</value>
+ <name>Page URL</name>
+ </row>
+ <row>
+ <value>urlparam</value>
+ <name>Page URL Parameter</name>
+ </row>
+ <row>
+ <value>action_name</value>
+ <name>Page Title</name>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableScopes.xml b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableScopes.xml
new file mode 100644
index 0000000000..6df7142c16
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getAvailableScopes.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <name>visit</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+ <row>
+ <name>action</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getConfiguredCustomDimensions.xml b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getConfiguredCustomDimensions.xml
new file mode 100644
index 0000000000..c234bed59e
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__CustomDimensions.getConfiguredCustomDimensions.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result /> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableExtractionDimensions.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableExtractionDimensions.xml
new file mode 100644
index 0000000000..7a397597a0
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableExtractionDimensions.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <value>url</value>
+ <name>Page URL</name>
+ </row>
+ <row>
+ <value>urlparam</value>
+ <name>Page URL Parameter</name>
+ </row>
+ <row>
+ <value>action_name</value>
+ <name>Page Title</name>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableScopes.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableScopes.xml
new file mode 100644
index 0000000000..6df7142c16
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getAvailableScopes.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <name>visit</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+ <row>
+ <name>action</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getConfiguredCustomDimensions.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getConfiguredCustomDimensions.xml
new file mode 100644
index 0000000000..c234bed59e
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__CustomDimensions.getConfiguredCustomDimensions.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result /> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml
index 4a3961acd5..52aca7f701 100644
--- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml
@@ -45,7 +45,7 @@
<reportMetadata>
<row>
- <idsubdatatable>5117</idsubdatatable>
+ <idsubdatatable>5119</idsubdatatable>
</row>
</reportMetadata>
<reportTotal>
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml
index a6a946e829..c5f4f6b6a5 100644
--- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml
@@ -54,7 +54,7 @@
<reportMetadata>
<row>
- <idsubdatatable>5121</idsubdatatable>
+ <idsubdatatable>5123</idsubdatatable>
</row>
</reportMetadata>
<reportTotal>
diff --git a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableExtractionDimensions.xml b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableExtractionDimensions.xml
new file mode 100644
index 0000000000..7a397597a0
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableExtractionDimensions.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <value>url</value>
+ <name>Page URL</name>
+ </row>
+ <row>
+ <value>urlparam</value>
+ <name>Page URL Parameter</name>
+ </row>
+ <row>
+ <value>action_name</value>
+ <name>Page Title</name>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableScopes.xml b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableScopes.xml
new file mode 100644
index 0000000000..6df7142c16
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getAvailableScopes.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <name>visit</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+ <row>
+ <name>action</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getConfiguredCustomDimensions.xml b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getConfiguredCustomDimensions.xml
new file mode 100644
index 0000000000..c234bed59e
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit_PeriodIsLast__CustomDimensions.getConfiguredCustomDimensions.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result /> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableExtractionDimensions.xml b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableExtractionDimensions.xml
new file mode 100644
index 0000000000..7a397597a0
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableExtractionDimensions.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <value>url</value>
+ <name>Page URL</name>
+ </row>
+ <row>
+ <value>urlparam</value>
+ <name>Page URL Parameter</name>
+ </row>
+ <row>
+ <value>action_name</value>
+ <name>Page Title</name>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableScopes.xml b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableScopes.xml
new file mode 100644
index 0000000000..6df7142c16
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getAvailableScopes.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <name>visit</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+ <row>
+ <name>action</name>
+ <numSlotsAvailable>5</numSlotsAvailable>
+ <numSlotsUsed>0</numSlotsUsed>
+ <numSlotsLeft>5</numSlotsLeft>
+ </row>
+</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getConfiguredCustomDimensions.xml b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getConfiguredCustomDimensions.xml
new file mode 100644
index 0000000000..c234bed59e
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_noVisit__CustomDimensions.getConfiguredCustomDimensions.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result /> \ No newline at end of file