Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2015-09-14 06:34:08 +0300
committermattab <matthieu.aubry@gmail.com>2015-09-14 06:34:08 +0300
commit2b07451df75425d9b531a4f69b45cc20de0ad01c (patch)
tree32aecc86f592f7a93efa4e2d22606398627b1ee6 /tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
parentee05506b187c946344216bed3c28032f15460573 (diff)
Refs #8727 Changing order of tests to have a consistent <idsubdatatable> counter over time
Diffstat (limited to 'tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php')
-rwxr-xr-xtests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php61
1 files changed, 32 insertions, 29 deletions
diff --git a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
index 872f725ad6..9e0d567e6b 100755
--- a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
+++ b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
@@ -66,44 +66,47 @@ class TwoVisitorsTwoWebsitesDifferentDaysTest extends SystemTestCase
$periods = array('day', 'week', 'month', 'year');
- $result = array(
- // Request data for the last 6 periods and idSite=all
- array($apiToCall, array('idSite' => 'all',
- 'date' => $dateTime,
- 'periods' => $periods,
- 'setDateLastN' => true)),
-
- // Request data for the last 6 periods and idSite=1
- array($apiToCall, array('idSite' => $idSite1,
- 'date' => $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' => $dateTime,
- 'periods' => array('day', 'month'),
- 'setDateLastN' => false,
- 'testSuffix' => '_NotLastNPeriods')),
- );
+ $result = array();
// testing metadata API for multiple periods
- $apiToCall = array_diff($apiToCall, array('Actions.getPageTitle', 'Actions.getPageUrl'));
- foreach ($apiToCall as $api) {
+ $apiToCallProcessedReport = array_diff($apiToCall, array('Actions.getPageTitle', 'Actions.getPageUrl'));
+ foreach ($apiToCallProcessedReport as $api) {
list($apiModule, $apiAction) = explode(".", $api);
$result[] = array(
'API.getProcessedReport', array('idSite' => $idSite1,
- 'date' => $dateTime,
- 'periods' => array('day'),
- 'setDateLastN' => true,
- 'apiModule' => $apiModule,
- 'apiAction' => $apiAction,
- 'testSuffix' => '_' . $api . '_firstSite_lastN')
+ 'date' => $dateTime,
+ 'periods' => array('day'),
+ 'setDateLastN' => true,
+ 'apiModule' => $apiModule,
+ 'apiAction' => $apiAction,
+ 'testSuffix' => '_' . $api . '_firstSite_lastN')
);
}
+ // Request data for the last 6 periods and idSite=all
+ $result[] = array($apiToCall, array('idSite' => 'all',
+ 'date' => $dateTime,
+ 'periods' => $periods,
+ 'setDateLastN' => true)
+ );
+
+ // Request data for the last 6 periods and idSite=1
+ $result[] = array($apiToCall, array('idSite' => $idSite1,
+ 'date' => $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
+ $result[] = array($singlePeriodApi, array('idSite' => 'all',
+ 'date' => $dateTime,
+ 'periods' => array('day', 'month'),
+ 'setDateLastN' => false,
+ 'testSuffix' => '_NotLastNPeriods')
+ );
+
return array_merge($result, self::getApiForTestingScheduledReports($dateTime, 'month'));
}