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:
authordiosmosis <benaka@piwik.pro>2014-10-21 08:09:08 +0400
committerdiosmosis <benaka@piwik.pro>2014-10-21 08:09:44 +0400
commitcc301f1afe22bd397a6edba2e1759b515455e35f (patch)
tree925156cd6750bbc163774737a796dc735b93e831 /tests/PHPUnit/System/PivotByQueryParamTest.php
parent452f67fa3820622570ca62ca38037544dec9091b (diff)
Fixes #6479, properly set period parameter in subtable & segment requests when period is range in PivotByDimension filter.
Diffstat (limited to 'tests/PHPUnit/System/PivotByQueryParamTest.php')
-rw-r--r--tests/PHPUnit/System/PivotByQueryParamTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/PHPUnit/System/PivotByQueryParamTest.php b/tests/PHPUnit/System/PivotByQueryParamTest.php
index f46813e879..e07ab83280 100644
--- a/tests/PHPUnit/System/PivotByQueryParamTest.php
+++ b/tests/PHPUnit/System/PivotByQueryParamTest.php
@@ -56,6 +56,16 @@ class PivotByQueryParamTest extends SystemTestCase
));
}
+ public function test_PivotBySubtableDimension_CreatesCorrectPivotTable_WhenPeriodIsDateRange()
+ {
+ $this->assertApiResponseEqualsExpected("Referrers.getKeywords", array(
+ 'idSite' => self::$fixture->idSite,
+ 'date' => '2009-12-29,2010-01-10',
+ 'period' => 'range',
+ 'pivotBy' => 'Referrers.SearchEngine'
+ ));
+ }
+
public function test_PivotBySegment_CreatesCorrectPivotTable()
{
$this->assertApiResponseEqualsExpected("Referrers.getKeywords", array(
@@ -81,6 +91,16 @@ class PivotByQueryParamTest extends SystemTestCase
));
}
+ public function test_PivotBySegment_CreatesCorrectPivotTable_WhenPeriodIsRange()
+ {
+ $this->assertApiResponseEqualsExpected("Referrers.getKeywords", array(
+ 'idSite' => self::$fixture->idSite,
+ 'date' => '2009-12-29,2010-01-10',
+ 'period' => 'range',
+ 'pivotBy' => 'UserCountry.City'
+ ));
+ }
+
public function test_PivotByParam_PlaysNiceWithOtherQueryParams()
{
$this->assertApiResponseEqualsExpected("Referrers.getKeywords", array(