diff --git a/core/API/DocumentationGenerator.php b/core/API/DocumentationGenerator.php index 0662ff153e0234f62bfb30336598bf30ed00b226..668f97bb6064fea0561187bec506fad8cc7bce53 100644 --- a/core/API/DocumentationGenerator.php +++ b/core/API/DocumentationGenerator.php @@ -193,6 +193,8 @@ class DocumentationGenerator $aParameters['pivotBy'] = false; $aParameters['pivotByColumn'] = false; $aParameters['pivotByColumnLimit'] = false; + $aParameters['disable_queued_filters'] = false; + $aParameters['disable_generic_filters'] = false; $moduleName = Proxy::getInstance()->getModuleNameFromClassName($class); $aParameters = array_merge(array('module' => 'API', 'method' => $moduleName . '.' . $methodName), $aParameters); diff --git a/core/DataTable/Filter/PivotByDimension.php b/core/DataTable/Filter/PivotByDimension.php index ba4f0220f6740778bc5c447ca4ecbddd9066daa0..fd176f8cf52e9e67f233f4c7b85eeb6aa28a14d5 100644 --- a/core/DataTable/Filter/PivotByDimension.php +++ b/core/DataTable/Filter/PivotByDimension.php @@ -215,7 +215,7 @@ class PivotByDimension extends BaseFilter $others = Piwik::translate('General_Others'); $defaultRow = $this->getPivotTableDefaultRowFromColumnSummary($columnSet, $others); - Log::debug("PivotByDimension::%s: processed pivoted columns: %s", __FUNCTION__, $defaultRow); + Log::debug("PivotByDimension::%s: un-prepended default row: %s", __FUNCTION__, $defaultRow); // post process pivoted datatable foreach ($table->getRows() as $row) { @@ -238,6 +238,18 @@ class PivotByDimension extends BaseFilter $table->clearQueuedFilters(); // TODO: shouldn't clear queued filters, but we can't wait for them to be run // since generic filters are run before them. remove after refactoring // processed metrics. + + // prepend numerals to columns in a queued filter (this way, disable_queued_filters can be used + // to get machine readable data from the API if needed) + $prependedColumnNames = $this->getOrderedColumnsWithPrependedNumerals($defaultRow, $others); + + Log::debug("PivotByDimension::%s: prepended column name mapping: %s", __FUNCTION__, $prependedColumnNames); + + $table->queueFilter(function (DataTable $table) use ($prependedColumnNames) { + foreach ($table->getRows() as $row) { + $row->setColumns(array_combine($prependedColumnNames, $row->getColumns())); + } + }); } /** @@ -445,6 +457,27 @@ class PivotByDimension extends BaseFilter return $columnSet; } + private function getOrderedColumnsWithPrependedNumerals($defaultRow, $othersRowLabel) + { + $result = array(); + + $currentIndex = 1; + foreach ($defaultRow as $columnName => $ignore) { + if ($columnName == $othersRowLabel + || $columnName == 'label' + ) { + $result[] = $columnName; + } else { + $modifiedColumnName = $currentIndex . '. ' . $columnName; + $result[] = $modifiedColumnName; + + ++$currentIndex; + } + } + + return $result; + } + /** * 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/Core/DataTable/Filter/PivotByDimensionTest.php b/tests/PHPUnit/Core/DataTable/Filter/PivotByDimensionTest.php index d711d6655c456c70f45355dc9695da0c77a5c8a8..f1de402f44ee664a94797bf362b732c49f4899bb 100644 --- a/tests/PHPUnit/Core/DataTable/Filter/PivotByDimensionTest.php +++ b/tests/PHPUnit/Core/DataTable/Filter/PivotByDimensionTest.php @@ -262,9 +262,9 @@ class PivotByDimensionTest extends PHPUnit_Framework_TestCase $pivotFilter->filter($table); $expectedRows = array( - array('label' => 'row 1', 'col 2' => false, 'col 3' => false, 'col 4' => false), - array('label' => 'row 2', 'col 2' => 5, 'col 3' => false, 'col 4' => false), - array('label' => 'row 3', 'col 2' => 7, 'col 3' => 9, 'col 4' => 32) + array('label' => 'row 1', 'col 2' => false, 'col 4' => false, 'General_Others' => 1), + array('label' => 'row 2', 'col 2' => 5, 'col 4' => false, 'General_Others' => 3), + array('label' => 'row 3', 'col 2' => 7, 'col 4' => 32, 'General_Others' => 9) ); $this->assertTableRowsEquals($expectedRows, $table); } diff --git a/tests/PHPUnit/Integration/PivotByQueryParamTest.php b/tests/PHPUnit/Integration/PivotByQueryParamTest.php index 2ca32cada28607957e2ceac3c70adb6f5da8462b..d798d22bea3bfa8a461b94b46df2e9c776480a0f 100644 --- a/tests/PHPUnit/Integration/PivotByQueryParamTest.php +++ b/tests/PHPUnit/Integration/PivotByQueryParamTest.php @@ -38,7 +38,8 @@ class PivotByQueryParamTest extends IntegrationTestCase 'period' => 'week', 'pivotBy' => 'Referrers.SearchEngine', 'pivotByColumn' => 'nb_visits', - 'pivotByColumnLimit' => -1 + 'pivotByColumnLimit' => -1, + 'disable_queued_filters' => 1 // test that prepending doesn't happen w/ this )); } 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 744fcf397e1cf35a3d7030e2db2c3e86b37abf12..d98cace554b06f9a86627c39a5da0b9e75d7b009 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="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">1</col> - <col name="Melbourne, Victoria, Australia">2</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">1</col> + <col name="3. Melbourne, Victoria, Australia">2</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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">2</col> + <col name="3. Melbourne, Victoria, Australia">0</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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">2</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">2</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">2</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">1</col> + <col name="3. Melbourne, Victoria, Australia">0</col> </row> </result> <result date="2010-01-04" /> 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 4635e78f761a340d84e38d90260ada27536b5b1a..ac43686db06627a4d6ef390bc7553580055906ca 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 @@ -2,32 +2,32 @@ <result> <row> <col name="label">this search term</col> - <col name="Toronto, Ontario, Canada">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> <col name="Others">3</col> </row> <row> <col name="label">search term 2</col> - <col name="Toronto, Ontario, Canada">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> <col name="Others">2</col> </row> <row> <col name="label">search term 3</col> - <col name="Toronto, Ontario, Canada">2</col> + <col name="1. Toronto, Ontario, Canada">2</col> <col name="Others">0</col> </row> <row> <col name="label">search term 4</col> - <col name="Toronto, Ontario, Canada">2</col> + <col name="1. Toronto, Ontario, Canada">2</col> <col name="Others">0</col> </row> <row> <col name="label">that search term</col> - <col name="Toronto, Ontario, Canada">0</col> + <col name="1. Toronto, Ontario, Canada">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="1. Toronto, Ontario, Canada">0</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 0536708ea8d46329d11063f42fe3dfce86e818ef..a465a67a14a20fbfaaf85163f4fbd9493102d342 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 9b82ca037aa72709e2f0ce9fb9718e14eacb7d70..736901c89a03342083d13b99f8d043ba74241dbb 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","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 +[{"label":"this search term","1. Toronto, Ontario, Canada":false,"2. Yokohama, Kanagawa, Japan":1,"3. Melbourne, Victoria, Australia":2},{"label":"search term 2","1. Toronto, Ontario, Canada":false,"2. Yokohama, Kanagawa, Japan":2,"3. Melbourne, Victoria, Australia":false},{"label":"search term 3","1. Toronto, Ontario, Canada":2,"2. Yokohama, Kanagawa, Japan":false,"3. Melbourne, Victoria, Australia":false},{"label":"search term 4","1. Toronto, Ontario, Canada":2,"2. Yokohama, Kanagawa, Japan":false,"3. Melbourne, Victoria, Australia":false},{"label":"that search term","1. Toronto, Ontario, Canada":false,"2. Yokohama, Kanagawa, Japan":false,"3. Melbourne, Victoria, Australia":2},{"label":"search term 1","1. Toronto, Ontario, Canada":false,"2. Yokohama, Kanagawa, Japan":1,"3. 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 5697f732c4b73dd0c8067002134e14e9bab8d757..0b88c2ff59742c5f855defa955e558aacea2b3e9 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="/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="/19">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">1</col> - <col name="/2">1</col> - <col name="/1">1</col> - <col name="/4">0</col> - <col name="/5">0</col> - <col name="/8">0</col> - <col name="/7">0</col> - <col name="/6">0</col> - <col name="/0">1</col> + <col name="1. /index">1</col> + <col name="2. /14">0</col> + <col name="3. /13">0</col> + <col name="4. /12">0</col> + <col name="5. /11">0</col> + <col name="6. /15">0</col> + <col name="7. /16">0</col> + <col name="8. /19">0</col> + <col name="9. /18">0</col> + <col name="10. /17">0</col> + <col name="11. /10">0</col> + <col name="12. /9">0</col> + <col name="13. /3">1</col> + <col name="14. /2">1</col> + <col name="15. /1">1</col> + <col name="16. /4">0</col> + <col name="17. /5">0</col> + <col name="18. /8">0</col> + <col name="19. /7">0</col> + <col name="20. /6">0</col> + <col name="21. /0">1</col> </row> <row> <col name="label">1</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="/19">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="/8">0</col> - <col name="/7">1</col> - <col name="/6">1</col> - <col name="/0">0</col> + <col name="1. /index">1</col> + <col name="2. /14">0</col> + <col name="3. /13">0</col> + <col name="4. /12">0</col> + <col name="5. /11">0</col> + <col name="6. /15">0</col> + <col name="7. /16">0</col> + <col name="8. /19">0</col> + <col name="9. /18">0</col> + <col name="10. /17">0</col> + <col name="11. /10">0</col> + <col name="12. /9">0</col> + <col name="13. /3">0</col> + <col name="14. /2">0</col> + <col name="15. /1">0</col> + <col name="16. /4">1</col> + <col name="17. /5">1</col> + <col name="18. /8">0</col> + <col name="19. /7">1</col> + <col name="20. /6">1</col> + <col name="21. /0">0</col> </row> <row> <col name="label">2</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="/19">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="/8">1</col> - <col name="/7">0</col> - <col name="/6">0</col> - <col name="/0">0</col> + <col name="1. /index">1</col> + <col name="2. /14">0</col> + <col name="3. /13">0</col> + <col name="4. /12">0</col> + <col name="5. /11">1</col> + <col name="6. /15">0</col> + <col name="7. /16">0</col> + <col name="8. /19">0</col> + <col name="9. /18">0</col> + <col name="10. /17">0</col> + <col name="11. /10">1</col> + <col name="12. /9">1</col> + <col name="13. /3">0</col> + <col name="14. /2">0</col> + <col name="15. /1">0</col> + <col name="16. /4">0</col> + <col name="17. /5">0</col> + <col name="18. /8">1</col> + <col name="19. /7">0</col> + <col name="20. /6">0</col> + <col name="21. /0">0</col> </row> <row> <col name="label">3</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="/19">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="/8">0</col> - <col name="/7">0</col> - <col name="/6">0</col> - <col name="/0">0</col> + <col name="1. /index">1</col> + <col name="2. /14">1</col> + <col name="3. /13">1</col> + <col name="4. /12">1</col> + <col name="5. /11">0</col> + <col name="6. /15">1</col> + <col name="7. /16">0</col> + <col name="8. /19">0</col> + <col name="9. /18">0</col> + <col name="10. /17">0</col> + <col name="11. /10">0</col> + <col name="12. /9">0</col> + <col name="13. /3">0</col> + <col name="14. /2">0</col> + <col name="15. /1">0</col> + <col name="16. /4">0</col> + <col name="17. /5">0</col> + <col name="18. /8">0</col> + <col name="19. /7">0</col> + <col name="20. /6">0</col> + <col name="21. /0">0</col> </row> <row> <col name="label">4</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="/19">1</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="/8">0</col> - <col name="/7">0</col> - <col name="/6">0</col> - <col name="/0">0</col> + <col name="1. /index">1</col> + <col name="2. /14">0</col> + <col name="3. /13">0</col> + <col name="4. /12">0</col> + <col name="5. /11">0</col> + <col name="6. /15">0</col> + <col name="7. /16">1</col> + <col name="8. /19">1</col> + <col name="9. /18">1</col> + <col name="10. /17">1</col> + <col name="11. /10">0</col> + <col name="12. /9">0</col> + <col name="13. /3">0</col> + <col name="14. /2">0</col> + <col name="15. /1">0</col> + <col name="16. /4">0</col> + <col name="17. /5">0</col> + <col name="18. /8">0</col> + <col name="19. /7">0</col> + <col name="20. /6">0</col> + <col name="21. /0">0</col> </row> </result> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTableWhenSegmentUsedInRequest__Referrers.getKeywords_week.xml b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTableWhenSegmentUsedInRequest__Referrers.getKeywords_week.xml index f4cc044f57ac65bd82472a53516c17f04a3733ec..52686d66101e456b3eca72e7552e49a15269206c 100644 --- a/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTableWhenSegmentUsedInRequest__Referrers.getKeywords_week.xml +++ b/tests/PHPUnit/Integration/expected/test_PivotByQueryParamTest_testPivotBySegmentCreatesCorrectPivotTableWhenSegmentUsedInRequest__Referrers.getKeywords_week.xml @@ -2,10 +2,10 @@ <result> <row> <col name="label">that search term</col> - <col name="Melbourne, Victoria, Australia">2</col> + <col name="1. Melbourne, Victoria, Australia">2</col> </row> <row> <col name="label">this search term</col> - <col name="Melbourne, Victoria, Australia">2</col> + <col name="1. Melbourne, Victoria, Australia">2</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 c6315c73261fab9e3236c37817e9b610f5066100..8112e991f5224325aa229f9236aaaf6392658e7b 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="Toronto, Ontario, Canada">0</col> - <col name="Yokohama, Kanagawa, Japan">1</col> - <col name="Melbourne, Victoria, Australia">2</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">1</col> + <col name="3. Melbourne, Victoria, Australia">2</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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">2</col> + <col name="3. Melbourne, Victoria, Australia">0</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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">2</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">2</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">2</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">0</col> + <col name="3. Melbourne, Victoria, Australia">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="Melbourne, Victoria, Australia">0</col> + <col name="1. Toronto, Ontario, Canada">0</col> + <col name="2. Yokohama, Kanagawa, Japan">1</col> + <col name="3. 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 1adf9d722a2cf3803f9eff4e97f53d9e6eb9f7f7..6ab56304222a894c5f55c6b2fc56ee557b38e1e7 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="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> + <col name="1. Google">1</col> + <col name="2. Yahoo!">1</col> + <col name="3. Ask">1</col> + <col name="4. Bing">0</col> + <col name="5. Alexa">0</col> + <col name="6. Babylon">0</col> </row> <row> <col name="label">search term 2</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> + <col name="1. Google">0</col> + <col name="2. Yahoo!">0</col> + <col name="3. Ask">0</col> + <col name="4. Bing">0</col> + <col name="5. Alexa">1</col> + <col name="6. Babylon">1</col> </row> <row> <col name="label">search term 3</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> + <col name="1. Google">1</col> + <col name="2. Yahoo!">0</col> + <col name="3. Ask">1</col> + <col name="4. Bing">0</col> + <col name="5. Alexa">0</col> + <col name="6. Babylon">0</col> </row> <row> <col name="label">search term 4</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> + <col name="1. Google">0</col> + <col name="2. Yahoo!">1</col> + <col name="3. Ask">0</col> + <col name="4. Bing">1</col> + <col name="5. Alexa">0</col> + <col name="6. Babylon">0</col> </row> <row> <col name="label">that search term</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> + <col name="1. Google">1</col> + <col name="2. Yahoo!">1</col> + <col name="3. Ask">0</col> + <col name="4. Bing">0</col> + <col name="5. Alexa">0</col> + <col name="6. Babylon">0</col> </row> <row> <col name="label">search term 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> + <col name="1. Google">0</col> + <col name="2. Yahoo!">0</col> + <col name="3. Ask">0</col> + <col name="4. Bing">1</col> + <col name="5. Alexa">0</col> + <col name="6. Babylon">0</col> </row> </result> \ No newline at end of file