diff options
author | diosmosis <benaka@piwik.pro> | 2015-04-07 03:33:58 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-04-07 03:33:58 +0300 |
commit | 29692df109baf946d65e168dcbcac5601dbadbcd (patch) | |
tree | 3615a0e8f1efae4c777dd6bb559eb5488308fe4c /tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php | |
parent | edc4a1b6c1850889d8845c66a886958e64f0d69c (diff) |
Fixing two more system test failures, including one caused by the static cache in Archive.php never being cleared, and the environment not existing in web archiving.
Diffstat (limited to 'tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php')
-rwxr-xr-x | tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php b/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php index 9cbc606a1f..4ab45a24fc 100755 --- a/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php +++ b/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php @@ -26,22 +26,23 @@ class TwoVisitsWithCustomVariablesSegmentMatchNONETest extends SystemTestCase */ public function testApi($api, $params) { + if (!array_key_exists('segment', $params)) { + $params['segment'] = $this->getSegmentToTest(); // this method can access the DB, so we get it here instead of the data provider + } + $this->runApiTests($api, $params); } public function getApiForTesting() { // we will test all segments from all plugins - Fixture::loadAllPlugins(); - $apiToCall = array('VisitsSummary.get', 'CustomVariables.getCustomVariables'); return array( array($apiToCall, array('idSite' => 'all', 'date' => self::$fixture->dateTime, 'periods' => array('day', 'week'), - 'setDateLastN' => true, - 'segment' => $this->getSegmentToTest())) + 'setDateLastN' => true)) ); } |