diff --git a/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDaysTest.php b/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDaysTest.php index 96df2301cc16b09868c7b5d7d7c0fe7efbbf449c..4c8b59a216ab88240d29cdce34966a6b8c504d0c 100755 --- a/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDaysTest.php +++ b/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDaysTest.php @@ -70,7 +70,7 @@ class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays extends Integ 'VisitorInterest.getNumberOfVisitsByDaysSinceLast'); } - public function getApiForTesting( $testScheduledReports = true ) + public function getApiForTesting() { $apiToCall = $this->getApiToCall(); $singlePeriodApi = array('VisitsSummary.get', 'Goals.get'); @@ -114,13 +114,8 @@ class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays extends Integ 'testSuffix' => '_' . $api . '_firstSite_lastN') ); } - - if ($testScheduledReports) - { - $result = array_merge($result, self::getApiForTestingScheduledReports(self::$dateTime, 'month')); - } - return $result; + return array_merge($result, self::getApiForTestingScheduledReports(self::$dateTime, 'month')); } public function getOutputPrefix() diff --git a/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDays_ConversionsTest.php b/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDays_ConversionsTest.php index 96d2e11398e4d3a9dcb3874aab9e389ba5831771..c70a5fa2d97516b8b1af7e8831f8de4f717b7172 100755 --- a/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDays_ConversionsTest.php +++ b/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDays_ConversionsTest.php @@ -8,12 +8,12 @@ */ require_once 'Goals/Goals.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Integration/TwoVisitors_TwoWebsites_DifferentDaysTest.php'; + /** * Same as TwoVisitors_twoWebsites_differentDays but with goals that convert * on every url. */ -class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays_Conversions extends Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays +class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays_Conversions extends IntegrationTestCase { protected static $idSite1 = 1; protected static $idSite2 = 2; @@ -44,14 +44,58 @@ class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays_Conversions e $this->runApiTests($api, $params); } - protected function getApiToCall() + public function getApiToCall() { return array('Goals.getDaysToConversion', 'MultiSites.getAll'); } public function getApiForTesting() { - $result = parent::getApiForTesting($testScheduledReports = false); + // NOTE: copied from TwoVisitors_TwoWebsites_DifferentDays (including the test or inheriting means + // the test will get run by phpunit, even when we only want to run this one. should be put into + // non-test class later.) + $apiToCall = $this->getApiToCall(); + $singlePeriodApi = array('VisitsSummary.get', 'Goals.get'); + + $periods = array('day', 'week', 'month', 'year'); + + $result = array( + // Request data for the last 6 periods and idSite=all + array($apiToCall, array('idSite' => 'all', + 'date' => self::$dateTime, + 'periods' => $periods, + 'setDateLastN' => true)), + + // Request data for the last 6 periods and idSite=1 + array($apiToCall, array('idSite' => self::$idSite1, + 'date' => self::$dateTime, + 'periods' => $periods, + 'setDateLastN' => true, + 'testSuffix' => '_idSiteOne_')), + + // We also test a single period to check that this use case (Reports per idSite in the response) works + array($singlePeriodApi, array('idSite' => 'all', + 'date' => self::$dateTime, + 'periods' => array('day', 'month'), + 'setDateLastN' => false, + 'testSuffix' => '_NotLastNPeriods')), + ); + + // testing metadata API for multiple periods + $apiToCall = array_diff($apiToCall, array('Actions.getPageTitle', 'Actions.getPageUrl')); + foreach ($apiToCall as $api) { + list($apiModule, $apiAction) = explode(".", $api); + + $result[] = array( + 'API.getProcessedReport', array('idSite' => self::$idSite1, + 'date' => self::$dateTime, + 'periods' => array('day'), + 'setDateLastN' => true, + 'apiModule' => $apiModule, + 'apiAction' => $apiAction, + 'testSuffix' => '_' . $api . '_firstSite_lastN') + ); + } // Tests that getting a visits summary metric (nb_visits) & a Goal's metric (Goal_revenue) // at the same time works. diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_Goals.getDaysToConversion_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_Goals.getDaysToConversion_firstSite_lastN__API.getProcessedReport_day.xml index 5134e25aebb4ff2ee2715f1b7a4fa41cf2461387..060d2c301a92febedb3c3b1bd92042ff7eaaec19 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_Goals.getDaysToConversion_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_Goals.getDaysToConversion_firstSite_lastN__API.getProcessedReport_day.xml @@ -36,7 +36,7 @@ <result prettyDate="Sunday 3 January 2010"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> <revenue>$ 0</revenue> </row> <row> @@ -46,7 +46,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>0</nb_conversions> <revenue>$ 0</revenue> </row> <row> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml index 2b634c95e81db8ec5bb0ba5f47853adf17ec6b12..c86dd437b05346f6faabf7ad055241490f870c73 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml @@ -65,10 +65,10 @@ <result prettyDate="Sunday 3 January 2010"> <row> <label>Site 1</label> - <nb_pageviews>4</nb_pageviews> + <nb_pageviews>2</nb_pageviews> <revenue>$ 10</revenue> - <nb_actions>7</nb_actions> - <nb_visits>2</nb_visits> + <nb_actions>1</nb_actions> + <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -84,14 +84,14 @@ <result prettyDate="Monday 4 January 2010"> <row> <label>Site 1</label> - <nb_pageviews>2</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>1</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> - <visits_evolution>-50%</visits_evolution> - <actions_evolution>-42.86%</actions_evolution> + <visits_evolution>0%</visits_evolution> + <actions_evolution>100%</actions_evolution> <pageviews_evolution>-50%</pageviews_evolution> + <revenue_evolution>-100%</revenue_evolution> <revenue>$ 0</revenue> - <revenue_evolution>0</revenue_evolution> <nb_conversions>0</nb_conversions> <nb_conversions_evolution>0</nb_conversions_evolution> <orders>0</orders> @@ -101,8 +101,8 @@ </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> @@ -120,12 +120,12 @@ <result prettyDate="Tuesday 5 January 2010"> <row> <label>Site 1</label> - <nb_pageviews>10</nb_pageviews> + <nb_pageviews>5</nb_pageviews> <revenue>$ 5</revenue> <nb_actions>5</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>0%</visits_evolution> - <actions_evolution>25%</actions_evolution> + <actions_evolution>150%</actions_evolution> <pageviews_evolution>400%</pageviews_evolution> <revenue_evolution>100%</revenue_evolution> <nb_conversions>0</nb_conversions> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_day.xml index 94810d3b566f16b22e4cb101b9263aa1add70f5f..6dc2190dedd40b2b38d9ebc5fa78f26a8e7b54f8 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_day.xml @@ -3,10 +3,8 @@ <result idSite="1"> <nb_conversions>2</nb_conversions> <nb_visits_converted>1</nb_visits_converted> - <conversion_rate>50</conversion_rate> + <conversion_rate>100</conversion_rate> <revenue>10</revenue> </result> <result idSite="2" /> - <result idSite="3" /> - <result idSite="4" /> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml index 981b5cc8058d01d71fa481d6daa42897c94737b7..5fee61a930f3affbe39b1a7eda0692f95b524743 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml @@ -3,7 +3,7 @@ <result idSite="1"> <nb_conversions>3</nb_conversions> <nb_visits_converted>3</nb_visits_converted> - <conversion_rate>75</conversion_rate> + <conversion_rate>100</conversion_rate> <revenue>15</revenue> </result> <result idSite="2"> @@ -11,6 +11,4 @@ <nb_visits_converted>1</nb_visits_converted> <conversion_rate>100</conversion_rate> </result> - <result idSite="3" /> - <result idSite="4" /> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml index fae6c41d32391cda9c6bcd9cc4f531a8b807b991..122c2f44602679dca6915e49a8bc76a9fe4ef145 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml @@ -2,17 +2,15 @@ <results> <result idSite="1"> <nb_uniq_visitors>1</nb_uniq_visitors> - <nb_visits>2</nb_visits> - <nb_actions>7</nb_actions> + <nb_visits>1</nb_visits> + <nb_actions>1</nb_actions> <nb_visits_converted>1</nb_visits_converted> <bounce_count>1</bounce_count> <sum_visit_length /> - <max_actions>6</max_actions> - <bounce_rate>50%</bounce_rate> - <nb_actions_per_visit>3.5</nb_actions_per_visit> + <max_actions>1</max_actions> + <bounce_rate>100%</bounce_rate> + <nb_actions_per_visit>1</nb_actions_per_visit> <avg_time_on_site>0</avg_time_on_site> </result> <result idSite="2" /> - <result idSite="3" /> - <result idSite="4" /> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml index 276cdb143ff8033777dcf913412b2532eaa11294..a541c425e74b5c190697ed19efb4114c8b073660 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml @@ -1,29 +1,27 @@ <?xml version="1.0" encoding="utf-8" ?> <results> <result idSite="1"> - <nb_uniq_visitors>3</nb_uniq_visitors> - <nb_visits>4</nb_visits> - <nb_actions>16</nb_actions> + <nb_uniq_visitors>2</nb_uniq_visitors> + <nb_visits>3</nb_visits> + <nb_actions>8</nb_actions> <nb_visits_converted>3</nb_visits_converted> <bounce_count>1</bounce_count> <sum_visit_length>1263</sum_visit_length> - <max_actions>6</max_actions> - <bounce_rate>25%</bounce_rate> - <nb_actions_per_visit>4</nb_actions_per_visit> - <avg_time_on_site>316</avg_time_on_site> + <max_actions>5</max_actions> + <bounce_rate>33%</bounce_rate> + <nb_actions_per_visit>2.7</nb_actions_per_visit> + <avg_time_on_site>421</avg_time_on_site> </result> <result idSite="2"> <nb_uniq_visitors>1</nb_uniq_visitors> <nb_visits>1</nb_visits> - <nb_actions>4</nb_actions> + <nb_actions>2</nb_actions> <nb_visits_converted>1</nb_visits_converted> <bounce_count /> <sum_visit_length>1</sum_visit_length> - <max_actions>4</max_actions> + <max_actions>2</max_actions> <bounce_rate>0%</bounce_rate> - <nb_actions_per_visit>4</nb_actions_per_visit> + <nb_actions_per_visit>2</nb_actions_per_visit> <avg_time_on_site>1</avg_time_on_site> </result> - <result idSite="3" /> - <result idSite="4" /> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_day.xml index 7e0e17e65bc833bff40139c3310e973f08cd2bd2..d807d81aed00119acbac276f847bc19d950113d7 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_day.xml @@ -4,7 +4,7 @@ <result date="2010-01-03"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -12,7 +12,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>0</nb_conversions> </row> <row> <label>3 days</label> @@ -189,22 +189,4 @@ <result date="2010-01-08" /> <result date="2010-01-09" /> </result> - <result idSite="3"> - <result date="2010-01-03" /> - <result date="2010-01-04" /> - <result date="2010-01-05" /> - <result date="2010-01-06" /> - <result date="2010-01-07" /> - <result date="2010-01-08" /> - <result date="2010-01-09" /> - </result> - <result idSite="4"> - <result date="2010-01-03" /> - <result date="2010-01-04" /> - <result date="2010-01-05" /> - <result date="2010-01-06" /> - <result date="2010-01-07" /> - <result date="2010-01-08" /> - <result date="2010-01-09" /> - </result> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_month.xml index 209501c13b10b333eef04ecd769786a3509c766a..ae27b569744fee433516ad99b467c524831447da 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_month.xml @@ -4,7 +4,7 @@ <result date="2010-01"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -12,7 +12,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>2</nb_conversions> + <nb_conversions>1</nb_conversions> </row> <row> <label>3 days</label> @@ -132,22 +132,4 @@ <result date="2010-06" /> <result date="2010-07" /> </result> - <result idSite="3"> - <result date="2010-01" /> - <result date="2010-02" /> - <result date="2010-03" /> - <result date="2010-04" /> - <result date="2010-05" /> - <result date="2010-06" /> - <result date="2010-07" /> - </result> - <result idSite="4"> - <result date="2010-01" /> - <result date="2010-02" /> - <result date="2010-03" /> - <result date="2010-04" /> - <result date="2010-05" /> - <result date="2010-06" /> - <result date="2010-07" /> - </result> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_week.xml index 7455e5f6b1a5624b45461c0ea3d5e25573375286..d6ebb9ca25c0f67891cd965cc10a9b5e1ca1ec99 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_week.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_week.xml @@ -4,7 +4,7 @@ <result date="From 2009-12-28 to 2010-01-03"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -12,7 +12,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>0</nb_conversions> </row> <row> <label>3 days</label> @@ -189,22 +189,4 @@ <result date="From 2010-02-01 to 2010-02-07" /> <result date="From 2010-02-08 to 2010-02-14" /> </result> - <result idSite="3"> - <result date="From 2009-12-28 to 2010-01-03" /> - <result date="From 2010-01-04 to 2010-01-10" /> - <result date="From 2010-01-11 to 2010-01-17" /> - <result date="From 2010-01-18 to 2010-01-24" /> - <result date="From 2010-01-25 to 2010-01-31" /> - <result date="From 2010-02-01 to 2010-02-07" /> - <result date="From 2010-02-08 to 2010-02-14" /> - </result> - <result idSite="4"> - <result date="From 2009-12-28 to 2010-01-03" /> - <result date="From 2010-01-04 to 2010-01-10" /> - <result date="From 2010-01-11 to 2010-01-17" /> - <result date="From 2010-01-18 to 2010-01-24" /> - <result date="From 2010-01-25 to 2010-01-31" /> - <result date="From 2010-02-01 to 2010-02-07" /> - <result date="From 2010-02-08 to 2010-02-14" /> - </result> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_year.xml index 45fd97da060e274ba5be56b92c0e270fad54cda4..715faf7ba4f98a8eb68b997caa9ef76176240a5e 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_year.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__Goals.getDaysToConversion_year.xml @@ -4,7 +4,7 @@ <result date="2010"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -12,7 +12,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>2</nb_conversions> + <nb_conversions>1</nb_conversions> </row> <row> <label>3 days</label> @@ -132,22 +132,4 @@ <result date="2015" /> <result date="2016" /> </result> - <result idSite="3"> - <result date="2010" /> - <result date="2011" /> - <result date="2012" /> - <result date="2013" /> - <result date="2014" /> - <result date="2015" /> - <result date="2016" /> - </result> - <result idSite="4"> - <result date="2010" /> - <result date="2011" /> - <result date="2012" /> - <result date="2013" /> - <result date="2014" /> - <result date="2015" /> - <result date="2016" /> - </result> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml index 532336cd88831e628dc7ff5a5c55c8d6aed6aef6..8a9568824510bcdab38cfe2bce9616ee89286390 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml @@ -3,10 +3,10 @@ <result date="2010-01-03"> <row> <label>Site 1</label> - <nb_pageviews>4</nb_pageviews> + <nb_pageviews>2</nb_pageviews> <revenue>10</revenue> - <nb_actions>7</nb_actions> - <nb_visits>2</nb_visits> + <nb_actions>1</nb_actions> + <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -17,18 +17,19 @@ <result date="2010-01-04"> <row> <label>Site 1</label> - <nb_pageviews>2</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>1</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> - <visits_evolution>-50%</visits_evolution> - <actions_evolution>-42.86%</actions_evolution> + <visits_evolution>0%</visits_evolution> + <actions_evolution>100%</actions_evolution> <pageviews_evolution>-50%</pageviews_evolution> + <revenue_evolution>-100%</revenue_evolution> <idsite>1</idsite> </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> @@ -39,12 +40,12 @@ <result date="2010-01-05"> <row> <label>Site 1</label> - <nb_pageviews>10</nb_pageviews> + <nb_pageviews>5</nb_pageviews> <revenue>5</revenue> <nb_actions>5</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>0%</visits_evolution> - <actions_evolution>25%</actions_evolution> + <actions_evolution>150%</actions_evolution> <pageviews_evolution>400%</pageviews_evolution> <revenue_evolution>100%</revenue_evolution> <idsite>1</idsite> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml index d338445eb61e435369c4a3c08cc4acf72be40fed..61a8a0128b4a4d74387ae168c2b855d69bbcd8f7 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml @@ -3,10 +3,10 @@ <result date="2010-01"> <row> <label>Site 1</label> - <nb_pageviews>16</nb_pageviews> + <nb_pageviews>8</nb_pageviews> <revenue>15</revenue> - <nb_actions>16</nb_actions> - <nb_visits>4</nb_visits> + <nb_actions>8</nb_actions> + <nb_visits>3</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -15,8 +15,8 @@ </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml index b6e7b8d9e4e9565bac6901326431e61ece88c7ef..ff2bcd47eeb3a687934935e1b1b0c871e2bd75f3 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml @@ -3,10 +3,10 @@ <result date="From 2009-12-28 to 2010-01-03"> <row> <label>Site 1</label> - <nb_pageviews>4</nb_pageviews> + <nb_pageviews>2</nb_pageviews> <revenue>10</revenue> - <nb_actions>7</nb_actions> - <nb_visits>2</nb_visits> + <nb_actions>1</nb_actions> + <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -17,20 +17,20 @@ <result date="From 2010-01-04 to 2010-01-10"> <row> <label>Site 1</label> - <nb_pageviews>12</nb_pageviews> + <nb_pageviews>6</nb_pageviews> <revenue>5</revenue> - <nb_actions>9</nb_actions> + <nb_actions>7</nb_actions> <nb_visits>2</nb_visits> - <visits_evolution>0%</visits_evolution> - <actions_evolution>28.57%</actions_evolution> + <visits_evolution>100%</visits_evolution> + <actions_evolution>600%</actions_evolution> <pageviews_evolution>200%</pageviews_evolution> <revenue_evolution>-50%</revenue_evolution> <idsite>1</idsite> </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml index d1f344bd2d0688bf1117d3b2f0b8adc65cd602d5..688fe16d5b60c65867322e5a9592d663e06fa415 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml @@ -3,10 +3,10 @@ <result date="2010"> <row> <label>Site 1</label> - <nb_pageviews>16</nb_pageviews> + <nb_pageviews>8</nb_pageviews> <revenue>15</revenue> - <nb_actions>16</nb_actions> - <nb_visits>4</nb_visits> + <nb_actions>8</nb_actions> + <nb_visits>3</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -15,8 +15,8 @@ </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_getMetricsFromDifferentReports__VisitsSummary.get_range.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_getMetricsFromDifferentReports__VisitsSummary.get_range.xml index f78cf184082818f976f6e7e61235ddd19d7e97bc..f3834129a63cb808fc0f497a15a99907ac1cabec 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_getMetricsFromDifferentReports__VisitsSummary.get_range.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_getMetricsFromDifferentReports__VisitsSummary.get_range.xml @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="utf-8" ?> <results> <result idSite="1"> - <nb_visits>4</nb_visits> - <Goal_conversion_rate>75</Goal_conversion_rate> + <nb_visits>3</nb_visits> + <Goal_conversion_rate>100</Goal_conversion_rate> </result> <result idSite="2"> <nb_visits>1</nb_visits> <Goal_conversion_rate>100</Goal_conversion_rate> </result> - <result idSite="3" /> - <result idSite="4" /> </results> \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_day.xml index b0b6f768a307acdd7b2ee933c92a34342d90577f..79b5bdab1be2db9a5aced29562e94ea105caca7c 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_day.xml @@ -3,7 +3,7 @@ <result date="2010-01-03"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -11,7 +11,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>0</nb_conversions> </row> <row> <label>3 days</label> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_month.xml index fbf6083fa1df00289427476ea9c2550e548723d2..7cab72dbf608dd719ae87b7d460ad41a5c929cec 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_month.xml @@ -3,7 +3,7 @@ <result date="2010-01"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -11,7 +11,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>2</nb_conversions> + <nb_conversions>1</nb_conversions> </row> <row> <label>3 days</label> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_week.xml index 15b8e00fda051c2850a43d56d770f45e4686569f..08c5ce524fee01cf0571abd9a122c41811124e01 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_week.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_week.xml @@ -3,7 +3,7 @@ <result date="From 2009-12-28 to 2010-01-03"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -11,7 +11,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>0</nb_conversions> </row> <row> <label>3 days</label> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_year.xml index 059d0f90568c86df7ce26ce6be0140107bcaed6c..e47c96a00017bbade7fbea5233e53bb930113b81 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_year.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___Goals.getDaysToConversion_year.xml @@ -3,7 +3,7 @@ <result date="2010"> <row> <label>0 days</label> - <nb_conversions>1</nb_conversions> + <nb_conversions>2</nb_conversions> </row> <row> <label>1 day</label> @@ -11,7 +11,7 @@ </row> <row> <label>2 days</label> - <nb_conversions>2</nb_conversions> + <nb_conversions>1</nb_conversions> </row> <row> <label>3 days</label> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml index 532336cd88831e628dc7ff5a5c55c8d6aed6aef6..8a9568824510bcdab38cfe2bce9616ee89286390 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml @@ -3,10 +3,10 @@ <result date="2010-01-03"> <row> <label>Site 1</label> - <nb_pageviews>4</nb_pageviews> + <nb_pageviews>2</nb_pageviews> <revenue>10</revenue> - <nb_actions>7</nb_actions> - <nb_visits>2</nb_visits> + <nb_actions>1</nb_actions> + <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -17,18 +17,19 @@ <result date="2010-01-04"> <row> <label>Site 1</label> - <nb_pageviews>2</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>1</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> - <visits_evolution>-50%</visits_evolution> - <actions_evolution>-42.86%</actions_evolution> + <visits_evolution>0%</visits_evolution> + <actions_evolution>100%</actions_evolution> <pageviews_evolution>-50%</pageviews_evolution> + <revenue_evolution>-100%</revenue_evolution> <idsite>1</idsite> </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> @@ -39,12 +40,12 @@ <result date="2010-01-05"> <row> <label>Site 1</label> - <nb_pageviews>10</nb_pageviews> + <nb_pageviews>5</nb_pageviews> <revenue>5</revenue> <nb_actions>5</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>0%</visits_evolution> - <actions_evolution>25%</actions_evolution> + <actions_evolution>150%</actions_evolution> <pageviews_evolution>400%</pageviews_evolution> <revenue_evolution>100%</revenue_evolution> <idsite>1</idsite> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml index d338445eb61e435369c4a3c08cc4acf72be40fed..61a8a0128b4a4d74387ae168c2b855d69bbcd8f7 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml @@ -3,10 +3,10 @@ <result date="2010-01"> <row> <label>Site 1</label> - <nb_pageviews>16</nb_pageviews> + <nb_pageviews>8</nb_pageviews> <revenue>15</revenue> - <nb_actions>16</nb_actions> - <nb_visits>4</nb_visits> + <nb_actions>8</nb_actions> + <nb_visits>3</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -15,8 +15,8 @@ </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml index b6e7b8d9e4e9565bac6901326431e61ece88c7ef..ff2bcd47eeb3a687934935e1b1b0c871e2bd75f3 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml @@ -3,10 +3,10 @@ <result date="From 2009-12-28 to 2010-01-03"> <row> <label>Site 1</label> - <nb_pageviews>4</nb_pageviews> + <nb_pageviews>2</nb_pageviews> <revenue>10</revenue> - <nb_actions>7</nb_actions> - <nb_visits>2</nb_visits> + <nb_actions>1</nb_actions> + <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -17,20 +17,20 @@ <result date="From 2010-01-04 to 2010-01-10"> <row> <label>Site 1</label> - <nb_pageviews>12</nb_pageviews> + <nb_pageviews>6</nb_pageviews> <revenue>5</revenue> - <nb_actions>9</nb_actions> + <nb_actions>7</nb_actions> <nb_visits>2</nb_visits> - <visits_evolution>0%</visits_evolution> - <actions_evolution>28.57%</actions_evolution> + <visits_evolution>100%</visits_evolution> + <actions_evolution>600%</actions_evolution> <pageviews_evolution>200%</pageviews_evolution> <revenue_evolution>-50%</revenue_evolution> <idsite>1</idsite> </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml index d1f344bd2d0688bf1117d3b2f0b8adc65cd602d5..688fe16d5b60c65867322e5a9592d663e06fa415 100755 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml @@ -3,10 +3,10 @@ <result date="2010"> <row> <label>Site 1</label> - <nb_pageviews>16</nb_pageviews> + <nb_pageviews>8</nb_pageviews> <revenue>15</revenue> - <nb_actions>16</nb_actions> - <nb_visits>4</nb_visits> + <nb_actions>8</nb_actions> + <nb_visits>3</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution> <pageviews_evolution>100%</pageviews_evolution> @@ -15,8 +15,8 @@ </row> <row> <label>Site 2</label> - <nb_pageviews>4</nb_pageviews> - <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <nb_actions>2</nb_actions> <nb_visits>1</nb_visits> <visits_evolution>100%</visits_evolution> <actions_evolution>100%</actions_evolution>