From 36c7c60e59d2f89d3719ef9b810e461ac1df7c61 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Wed, 26 Nov 2014 18:45:08 -0800 Subject: [PATCH] Fixing more tests. --- core/API/DataTablePostProcessor.php | 2 +- ...Site_lastN__API.getProcessedReport_day.xml | 60 ++++++++++--------- ...dReports.generateReport_month.original.csv | 6 +- ...sShouldAppear__VisitsSummary.get_month.xml | 6 ++ ...sShouldAppear__VisitsSummary.get_month.xml | 6 ++ 5 files changed, 47 insertions(+), 33 deletions(-) diff --git a/core/API/DataTablePostProcessor.php b/core/API/DataTablePostProcessor.php index aeadb6f7abc..72facbf41c3 100644 --- a/core/API/DataTablePostProcessor.php +++ b/core/API/DataTablePostProcessor.php @@ -264,7 +264,7 @@ public function removeTemporaryMetrics(DataTableInterface $dataTable) $report = $this->report; $dataTable->filter(function (DataTable $table) use ($report, $allColumns) { - $processedMetrics = Report::getProcessedMetricsForTable($table, $this->report); + $processedMetrics = Report::getProcessedMetricsForTable($table, $report); $allTemporaryMetrics = array(); foreach ($processedMetrics as $metric) { diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml index 31f9f119275..aabc0dcb25b 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml @@ -10,25 +10,27 @@ Website Visits - Visits Evolution Actions - Actions Evolution Pageviews - Pageviews Evolution Revenue - Revenue Evolution Conversions - Conversions Evolution Ecommerce Orders - Ecommerce Orders Evolution Product Revenue - Product Revenue Evolution If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit. The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks. The number of times this page was visited. + + Visits Evolution + Actions Evolution + Pageviews Evolution + Revenue Evolution + Conversions Evolution + Ecommerce Orders Evolution + Product Revenue Evolution + index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=MultiSites&apiAction=getAll&period=range&date=2010-01-03,2010-01-09 index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=MultiSites&apiAction=getAll&period=day&date=2010-01-03,2010-01-09 MultiSites_getAll @@ -36,18 +38,18 @@ Visits - Visits Evolution Actions - Actions Evolution Pageviews - Pageviews Evolution Revenue - Revenue Evolution Conversions - Conversions Evolution Ecommerce Orders - Ecommerce Orders Evolution Product Revenue + Visits Evolution + Actions Evolution + Pageviews Evolution + Revenue Evolution + Conversions Evolution + Ecommerce Orders Evolution Product Revenue Evolution @@ -63,10 +65,10 @@ 100% 100% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -82,10 +84,10 @@ -50% -100% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -99,10 +101,10 @@ 100% 0% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -118,10 +120,10 @@ 400% 100% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -137,10 +139,10 @@ 0% 0% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -156,10 +158,10 @@ 0% 0% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -175,10 +177,10 @@ 0% 0% 0 - 0 0 - 0 $ 0 + 0 + 0 0 @@ -194,10 +196,10 @@ 0% 0% 0 - 0 0 - 0 $ 0 + 0 + 0 0 diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_csv__ScheduledReports.generateReport_month.original.csv b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_csv__ScheduledReports.generateReport_month.original.csv index 2231592da2b..b69ad366c51 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_csv__ScheduledReports.generateReport_month.original.csv +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_csv__ScheduledReports.generateReport_month.original.csv @@ -1,7 +1,7 @@ All Websites dashboard -label,nb_visits,nb_actions,nb_pageviews,revenue,nb_conversions,visits_evolution,actions_evolution,pageviews_evolution,revenue_evolution,nb_conversions_evolution,orders,orders_evolution,ecommerce_revenue,ecommerce_revenue_evolution -Site 1,10,43,43,$ 0,0,100%,100%,100%,0%,0%,0,0,$ 0,0 -Site 2,1,3,3,$ 0,0,100%,100%,100%,0%,0%,0,0,$ 0,0 +label,nb_visits,nb_actions,nb_pageviews,revenue,nb_conversions,visits_evolution,actions_evolution,pageviews_evolution,revenue_evolution,nb_conversions_evolution,orders,ecommerce_revenue,orders_evolution,ecommerce_revenue_evolution +Site 1,10,43,43,$ 0,0,100%,100%,100%,0%,0%,0,$ 0,0,0 +Site 2,1,3,3,$ 0,0,100%,100%,100%,0%,0%,0,$ 0,0,0 Visits Summary nb_uniq_visitors,nb_users,nb_visits,nb_actions,max_actions,nb_actions_per_visit,avg_time_on_site,bounce_rate diff --git a/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite1_OldReportsShouldAppear__VisitsSummary.get_month.xml b/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite1_OldReportsShouldAppear__VisitsSummary.get_month.xml index fee45c6b812..2f7ce19aa59 100644 --- a/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite1_OldReportsShouldAppear__VisitsSummary.get_month.xml +++ b/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite1_OldReportsShouldAppear__VisitsSummary.get_month.xml @@ -5,6 +5,9 @@ 0 1 4 + 0 + 0 + 1 4 0% 4 @@ -16,6 +19,9 @@ 0 1 6 + 0 + 0 + 1 6 0% 6 diff --git a/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite2_OldReportsShouldAppear__VisitsSummary.get_month.xml b/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite2_OldReportsShouldAppear__VisitsSummary.get_month.xml index aa82f70f97b..ed3e2b6ade2 100644 --- a/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite2_OldReportsShouldAppear__VisitsSummary.get_month.xml +++ b/tests/PHPUnit/System/expected/test_VisitsInPast_InvalidateOldReportsWebsite2_OldReportsShouldAppear__VisitsSummary.get_month.xml @@ -5,6 +5,9 @@ 0 1 5 + 0 + 0 + 361 5 0% 5 @@ -17,6 +20,9 @@ 0 1 6 + 0 + 0 + 1 6 0% 6