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:
authordiosmosis <benaka.moorthi@gmail.com>2013-04-17 12:27:00 +0400
committerdiosmosis <benaka.moorthi@gmail.com>2013-04-17 12:27:00 +0400
commit08cfe92f278e987fb43ca6584b1822d61774dceb (patch)
tree73126d2f0fcbbc2923f7678e4f85c65ee17adadd /tests
parent540a0bbed6eb9600d5f9ace55c8346b2e8938325 (diff)
Fixes #3868, make sure show/hideColumns query params affect metrics when report metadata doesn't provide a translation for metrics, and make sure if no columns are displayed for a report, API.get doesn't fail.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php11
-rw-r--r--tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_showColumns__API.get_day.xml6
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
index f8d1468e39..9bd0eb113d 100755
--- a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
+++ b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
@@ -136,6 +136,17 @@ class Test_Piwik_Integration_OneVisitorTwoVisits extends IntegrationTestCase
'avg_time_generation,nb_hits_with_time_generation',
'expanded' => '1'
))),
+
+ // test showColumns on API.get
+ array('API.get', array(
+ 'idSite' => $idSite,
+ 'date' => $dateTime,
+ 'periods' => 'day',
+ 'testSuffix' => '_showColumns',
+ 'otherRequestParameters' => array(
+ 'showColumns' => 'nb_uniq_visitors,nb_pageviews,bounce_rate'
+ )
+ )),
);
}
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_showColumns__API.get_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_showColumns__API.get_day.xml
new file mode 100644
index 0000000000..cdd370d354
--- /dev/null
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_showColumns__API.get_day.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <bounce_rate>50%</bounce_rate>
+ <nb_pageviews>4</nb_pageviews>
+</result> \ No newline at end of file