diff --git a/core/DataTable/Filter/PivotByDimension.php b/core/DataTable/Filter/PivotByDimension.php index 902c03f1b55ef7aaf20be8fd24b98f31bccdb3b9..ba4f0220f6740778bc5c447ca4ecbddd9066daa0 100644 --- a/core/DataTable/Filter/PivotByDimension.php +++ b/core/DataTable/Filter/PivotByDimension.php @@ -17,6 +17,7 @@ use Piwik\DataTable\BaseFilter; use Piwik\DataTable\Row; use Piwik\Log; use Piwik\Metrics; +use Piwik\Piwik; use Piwik\Plugin\Report; use Piwik\Plugin\Segment; @@ -211,22 +212,10 @@ class PivotByDimension extends BaseFilter Log::debug("PivotByDimension::%s: pivoted columns set: %s", __FUNCTION__, $columnSet); - // limit columns - if ($this->pivotByColumnLimit > 0) { - arsort($columnSet); - $columnSet = array_slice($columnSet, 0, $this->pivotByColumnLimit, $preserveKeys = true); - } - - // sort columns by name (to ensure deterministic ordering) - ksort($columnSet); + $others = Piwik::translate('General_Others'); + $defaultRow = $this->getPivotTableDefaultRowFromColumnSummary($columnSet, $others); - // remove column sums from array so it can be used as a default row - $columnSet = array_map(function () { return false; }, $columnSet); - - // make sure label column is first - $columnSet = array_merge(array('label' => false), $columnSet); - - Log::debug("PivotByDimension::%s: processed pivoted columns: %s", __FUNCTION__, $columnSet); + Log::debug("PivotByDimension::%s: processed pivoted columns: %s", __FUNCTION__, $defaultRow); // post process pivoted datatable foreach ($table->getRows() as $row) { @@ -234,11 +223,13 @@ class PivotByDimension extends BaseFilter $row->removeSubtable(); $row->deleteMetadata('idsubdatatable_in_db'); - // use default row to ensure column ordering and add missing columns - $orderedColumns = $columnSet; + // use default row to ensure column ordering and add missing columns/aggregate cut-off columns + $orderedColumns = $defaultRow; foreach ($row->getColumns() as $name => $value) { if (isset($orderedColumns[$name])) { $orderedColumns[$name] = $value; + } else { + $orderedColumns[$others] += $value; } } $row->setColumns($orderedColumns); @@ -432,6 +423,28 @@ class PivotByDimension extends BaseFilter return $params; } + private function getPivotTableDefaultRowFromColumnSummary($columnSet, $othersRowLabel) + { + // sort columns by sum (to ensure deterministic ordering) + arsort($columnSet); + + // limit columns if necessary (adding aggregate Others column at end) + if ($this->pivotByColumnLimit > 0 + && count($columnSet) > $this->pivotByColumnLimit + ) { + $columnSet = array_slice($columnSet, 0, $this->pivotByColumnLimit - 1, $preserveKeys = true); + $columnSet[$othersRowLabel] = 0; + } + + // remove column sums from array so it can be used as a default row + $columnSet = array_map(function () { return false; }, $columnSet); + + // make sure label column is first + $columnSet = array_merge(array('label' => false), $columnSet); + + return $columnSet; + } + /** * Returns true if pivoting by subtable is supported for a report. Will return true if the report * has a subtable dimension and if the subtable dimension is different than the report's dimension. diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithDataTableMaps__Referrers.getKeywords_day.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithDataTableMaps__Referrers.getKeywords_day.xml index a60b9519fbf275abc73f7090474d6a9d064f5321..744fcf397e1cf35a3d7030e2db2c3e86b37abf12 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithDataTableMaps__Referrers.getKeywords_day.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithDataTableMaps__Referrers.getKeywords_day.xml @@ -6,39 +6,39 @@ <result date="2010-01-03"> <row> <col name="label">this search term</col> - <col name="Melbourne, Victoria, Australia">2</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Melbourne, Victoria, Australia">2</col> </row> <row> <col name="label">search term 2</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">2</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">search term 3</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">2</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">search term 4</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">2</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">that search term</col> - <col name="Melbourne, Victoria, Australia">2</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">2</col> </row> <row> <col name="label">search term 1</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> </result> <result date="2010-01-04" /> diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithOtherQueryParams__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithOtherQueryParams__Referrers.getKeywords_week.xml index 777020b15efee3db959a4147ab585624a8d77e1c..05553ef4f85728f7bac52dc5951d9f2f62a05e7f 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithOtherQueryParams__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamPlaysNiceWithOtherQueryParams__Referrers.getKeywords_week.xml @@ -2,32 +2,32 @@ <result> <row> <label>this search term</label> - <Bing>0</Bing> <Google>1</Google> + <Bing>0</Bing> </row> <row> <label>search term 2</label> - <Bing>0</Bing> <Google>0</Google> + <Bing>0</Bing> </row> <row> <label>search term 3</label> - <Bing>0</Bing> <Google>1</Google> + <Bing>0</Bing> </row> <row> <label>search term 4</label> - <Bing>1</Bing> <Google>0</Google> + <Bing>1</Bing> </row> <row> <label>that search term</label> - <Bing>0</Bing> <Google>1</Google> + <Bing>0</Bing> </row> <row> <label>search term 1</label> - <Bing>1</Bing> <Google>0</Google> + <Bing>1</Bing> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithColumnLimiting__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithColumnLimiting__Referrers.getKeywords_week.xml index 70bcfeed7d017ee1c8e6bb715e9244e1d5a36c89..4635e78f761a340d84e38d90260ada27536b5b1a 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithColumnLimiting__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithColumnLimiting__Referrers.getKeywords_week.xml @@ -3,31 +3,31 @@ <row> <col name="label">this search term</col> <col name="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Others">3</col> </row> <row> <col name="label">search term 2</col> <col name="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">2</col> + <col name="Others">2</col> </row> <row> <col name="label">search term 3</col> <col name="Toronto, Ontario, Canada">2</col> - <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Others">0</col> </row> <row> <col name="label">search term 4</col> <col name="Toronto, Ontario, Canada">2</col> - <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Others">0</col> </row> <row> <col name="label">that search term</col> <col name="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Others">2</col> </row> <row> <col name="label">search term 1</col> <col name="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Others">1</col> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithCsvOutput__Referrers.getKeywords_week.csv b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithCsvOutput__Referrers.getKeywords_week.csv index 9b91feb5eead3c6d577217765e389e2bf3b99fd6..0536708ea8d46329d11063f42fe3dfce86e818ef 100644 Binary files a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithCsvOutput__Referrers.getKeywords_week.csv and b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithCsvOutput__Referrers.getKeywords_week.csv differ diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithJsonOutput__Referrers.getKeywords_week.json b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithJsonOutput__Referrers.getKeywords_week.json index 3ffebb1d65366ec3429af0fc7196e9dd4fd4688d..9b82ca037aa72709e2f0ce9fb9718e14eacb7d70 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithJsonOutput__Referrers.getKeywords_week.json +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithJsonOutput__Referrers.getKeywords_week.json @@ -1 +1 @@ -[{"label":"this search term","Melbourne, Victoria, Australia":2,"Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":1},{"label":"search term 2","Melbourne, Victoria, Australia":false,"Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":2},{"label":"search term 3","Melbourne, Victoria, Australia":false,"Toronto, Ontario, Canada":2,"Yokohama, Kanagawa, Japan":false},{"label":"search term 4","Melbourne, Victoria, Australia":false,"Toronto, Ontario, Canada":2,"Yokohama, Kanagawa, Japan":false},{"label":"that search term","Melbourne, Victoria, Australia":2,"Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":false},{"label":"search term 1","Melbourne, Victoria, Australia":false,"Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":1}] \ No newline at end of file +[{"label":"this search term","Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":1,"Melbourne, Victoria, Australia":2},{"label":"search term 2","Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":2,"Melbourne, Victoria, Australia":false},{"label":"search term 3","Toronto, Ontario, Canada":2,"Yokohama, Kanagawa, Japan":false,"Melbourne, Victoria, Australia":false},{"label":"search term 4","Toronto, Ontario, Canada":2,"Yokohama, Kanagawa, Japan":false,"Melbourne, Victoria, Australia":false},{"label":"that search term","Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":false,"Melbourne, Victoria, Australia":2},{"label":"search term 1","Toronto, Ontario, Canada":false,"Yokohama, Kanagawa, Japan":1,"Melbourne, Victoria, Australia":false}] \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithReportWhoseSubtableIsSelf__Actions.getPageUrls_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithReportWhoseSubtableIsSelf__Actions.getPageUrls_week.xml index 45bd7630ea994d6ba51212659dd1533e747e1f3a..5697f732c4b73dd0c8067002134e14e9bab8d757 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithReportWhoseSubtableIsSelf__Actions.getPageUrls_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotByParamWorksWithReportWhoseSubtableIsSelf__Actions.getPageUrls_week.xml @@ -2,122 +2,122 @@ <result> <row> <col name="label">0</col> - <col name="/0">1</col> - <col name="/1">1</col> - <col name="/10">0</col> - <col name="/11">0</col> - <col name="/12">0</col> - <col name="/13">0</col> + <col name="/index">1</col> <col name="/14">0</col> + <col name="/13">0</col> + <col name="/12">0</col> + <col name="/11">0</col> <col name="/15">0</col> <col name="/16">0</col> - <col name="/17">0</col> - <col name="/18">0</col> <col name="/19">0</col> - <col name="/2">1</col> + <col name="/18">0</col> + <col name="/17">0</col> + <col name="/10">0</col> + <col name="/9">0</col> <col name="/3">1</col> + <col name="/2">1</col> + <col name="/1">1</col> <col name="/4">0</col> <col name="/5">0</col> - <col name="/6">0</col> - <col name="/7">0</col> <col name="/8">0</col> - <col name="/9">0</col> - <col name="/index">1</col> + <col name="/7">0</col> + <col name="/6">0</col> + <col name="/0">1</col> </row> <row> <col name="label">1</col> - <col name="/0">0</col> - <col name="/1">0</col> - <col name="/10">0</col> - <col name="/11">0</col> - <col name="/12">0</col> - <col name="/13">0</col> + <col name="/index">1</col> <col name="/14">0</col> + <col name="/13">0</col> + <col name="/12">0</col> + <col name="/11">0</col> <col name="/15">0</col> <col name="/16">0</col> - <col name="/17">0</col> - <col name="/18">0</col> <col name="/19">0</col> - <col name="/2">0</col> + <col name="/18">0</col> + <col name="/17">0</col> + <col name="/10">0</col> + <col name="/9">0</col> <col name="/3">0</col> + <col name="/2">0</col> + <col name="/1">0</col> <col name="/4">1</col> <col name="/5">1</col> - <col name="/6">1</col> - <col name="/7">1</col> <col name="/8">0</col> - <col name="/9">0</col> - <col name="/index">1</col> + <col name="/7">1</col> + <col name="/6">1</col> + <col name="/0">0</col> </row> <row> <col name="label">2</col> - <col name="/0">0</col> - <col name="/1">0</col> - <col name="/10">1</col> - <col name="/11">1</col> - <col name="/12">0</col> - <col name="/13">0</col> + <col name="/index">1</col> <col name="/14">0</col> + <col name="/13">0</col> + <col name="/12">0</col> + <col name="/11">1</col> <col name="/15">0</col> <col name="/16">0</col> - <col name="/17">0</col> - <col name="/18">0</col> <col name="/19">0</col> - <col name="/2">0</col> + <col name="/18">0</col> + <col name="/17">0</col> + <col name="/10">1</col> + <col name="/9">1</col> <col name="/3">0</col> + <col name="/2">0</col> + <col name="/1">0</col> <col name="/4">0</col> <col name="/5">0</col> - <col name="/6">0</col> - <col name="/7">0</col> <col name="/8">1</col> - <col name="/9">1</col> - <col name="/index">1</col> + <col name="/7">0</col> + <col name="/6">0</col> + <col name="/0">0</col> </row> <row> <col name="label">3</col> - <col name="/0">0</col> - <col name="/1">0</col> - <col name="/10">0</col> - <col name="/11">0</col> - <col name="/12">1</col> - <col name="/13">1</col> + <col name="/index">1</col> <col name="/14">1</col> + <col name="/13">1</col> + <col name="/12">1</col> + <col name="/11">0</col> <col name="/15">1</col> <col name="/16">0</col> - <col name="/17">0</col> - <col name="/18">0</col> <col name="/19">0</col> - <col name="/2">0</col> + <col name="/18">0</col> + <col name="/17">0</col> + <col name="/10">0</col> + <col name="/9">0</col> <col name="/3">0</col> + <col name="/2">0</col> + <col name="/1">0</col> <col name="/4">0</col> <col name="/5">0</col> - <col name="/6">0</col> - <col name="/7">0</col> <col name="/8">0</col> - <col name="/9">0</col> - <col name="/index">1</col> + <col name="/7">0</col> + <col name="/6">0</col> + <col name="/0">0</col> </row> <row> <col name="label">4</col> - <col name="/0">0</col> - <col name="/1">0</col> - <col name="/10">0</col> - <col name="/11">0</col> - <col name="/12">0</col> - <col name="/13">0</col> + <col name="/index">1</col> <col name="/14">0</col> + <col name="/13">0</col> + <col name="/12">0</col> + <col name="/11">0</col> <col name="/15">0</col> <col name="/16">1</col> - <col name="/17">1</col> - <col name="/18">1</col> <col name="/19">1</col> - <col name="/2">0</col> + <col name="/18">1</col> + <col name="/17">1</col> + <col name="/10">0</col> + <col name="/9">0</col> <col name="/3">0</col> + <col name="/2">0</col> + <col name="/1">0</col> <col name="/4">0</col> <col name="/5">0</col> - <col name="/6">0</col> - <col name="/7">0</col> <col name="/8">0</col> - <col name="/9">0</col> - <col name="/index">1</col> + <col name="/7">0</col> + <col name="/6">0</col> + <col name="/0">0</col> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTable__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTable__Referrers.getKeywords_week.xml index 99086f82e85150d763c098f3fabc4c6287b9243a..c6315c73261fab9e3236c37817e9b610f5066100 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTable__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTable__Referrers.getKeywords_week.xml @@ -2,38 +2,38 @@ <result> <row> <col name="label">this search term</col> - <col name="Melbourne, Victoria, Australia">2</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Melbourne, Victoria, Australia">2</col> </row> <row> <col name="label">search term 2</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">2</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">search term 3</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">2</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">search term 4</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">2</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> <row> <col name="label">that search term</col> - <col name="Melbourne, Victoria, Australia">2</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">0</col> + <col name="Melbourne, Victoria, Australia">2</col> </row> <row> <col name="label">search term 1</col> - <col name="Melbourne, Victoria, Australia">0</col> <col name="Toronto, Ontario, Canada">0</col> <col name="Yokohama, Kanagawa, Japan">1</col> + <col name="Melbourne, Victoria, Australia">0</col> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTableWhenEntireHirearchyIsNotLoaded__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTableWhenEntireHirearchyIsNotLoaded__Referrers.getKeywords_week.xml index 4c9fe03b6f26eccb754929d905e5ef258648515a..1adf9d722a2cf3803f9eff4e97f53d9e6eb9f7f7 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTableWhenEntireHirearchyIsNotLoaded__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTableWhenEntireHirearchyIsNotLoaded__Referrers.getKeywords_week.xml @@ -2,56 +2,56 @@ <result> <row> <col name="label">this search term</col> - <col name="Alexa">0</col> - <col name="Ask">1</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">1</col> + <col name="Ask">1</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 2</col> - <col name="Alexa">1</col> - <col name="Ask">0</col> - <col name="Babylon">1</col> - <col name="Bing">0</col> <col name="Google">0</col> <col name="Yahoo!">0</col> + <col name="Ask">0</col> + <col name="Bing">0</col> + <col name="Alexa">1</col> + <col name="Babylon">1</col> </row> <row> <col name="label">search term 3</col> - <col name="Alexa">0</col> - <col name="Ask">1</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">0</col> + <col name="Ask">1</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 4</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">1</col> <col name="Google">0</col> <col name="Yahoo!">1</col> + <col name="Ask">0</col> + <col name="Bing">1</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">that search term</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">1</col> + <col name="Ask">0</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 1</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">1</col> <col name="Google">0</col> <col name="Yahoo!">0</col> + <col name="Ask">0</col> + <col name="Bing">1</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTable__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTable__Referrers.getKeywords_week.xml index 4c9fe03b6f26eccb754929d905e5ef258648515a..1adf9d722a2cf3803f9eff4e97f53d9e6eb9f7f7 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTable__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySubtableDimensionCreatesCorrectPivotTable__Referrers.getKeywords_week.xml @@ -2,56 +2,56 @@ <result> <row> <col name="label">this search term</col> - <col name="Alexa">0</col> - <col name="Ask">1</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">1</col> + <col name="Ask">1</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 2</col> - <col name="Alexa">1</col> - <col name="Ask">0</col> - <col name="Babylon">1</col> - <col name="Bing">0</col> <col name="Google">0</col> <col name="Yahoo!">0</col> + <col name="Ask">0</col> + <col name="Bing">0</col> + <col name="Alexa">1</col> + <col name="Babylon">1</col> </row> <row> <col name="label">search term 3</col> - <col name="Alexa">0</col> - <col name="Ask">1</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">0</col> + <col name="Ask">1</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 4</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">1</col> <col name="Google">0</col> <col name="Yahoo!">1</col> + <col name="Ask">0</col> + <col name="Bing">1</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">that search term</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">0</col> <col name="Google">1</col> <col name="Yahoo!">1</col> + <col name="Ask">0</col> + <col name="Bing">0</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> <row> <col name="label">search term 1</col> - <col name="Alexa">0</col> - <col name="Ask">0</col> - <col name="Babylon">0</col> - <col name="Bing">1</col> <col name="Google">0</col> <col name="Yahoo!">0</col> + <col name="Ask">0</col> + <col name="Bing">1</col> + <col name="Alexa">0</col> + <col name="Babylon">0</col> </row> </result> \ No newline at end of file