diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-11-09 05:00:04 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-11-09 05:00:04 +0300 |
commit | 3b739b261ff44758cb49a007c69dd32f7fcbbd70 (patch) | |
tree | d977f74dcbdf66f63b813c0178f27d9750f4a69e /plugins/CustomVariables | |
parent | 27f1f5b5e28c94e73921ee3b2aa517a67b1fe555 (diff) |
Fix System tests by not using 'date=today' in tests
we need tests to have deterministic 'idsubdatatable'
Diffstat (limited to 'plugins/CustomVariables')
-rw-r--r-- | plugins/CustomVariables/API.php | 5 | ||||
-rw-r--r-- | plugins/CustomVariables/config/config.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/CustomVariables/API.php b/plugins/CustomVariables/API.php index 57832927e5..c737ae3a93 100644 --- a/plugins/CustomVariables/API.php +++ b/plugins/CustomVariables/API.php @@ -10,6 +10,7 @@ namespace Piwik\Plugins\CustomVariables; use Piwik\API\Request; use Piwik\Archive; +use Piwik\Container\StaticContainer; use Piwik\DataTable; use Piwik\Date; use Piwik\Metrics; @@ -137,8 +138,10 @@ class API extends \Piwik\Plugin\API ); /** @var DataTable $customVarUsages */ + $today = StaticContainer::get('CustomVariables.today'); + $date = '2008-12-12,' . $today; $customVarUsages = Request::processRequest('CustomVariables.getCustomVariables', - array('idSite' => $idSite, 'period' => 'range', 'date' => '2008-12-12,today', + array('idSite' => $idSite, 'period' => 'range', 'date' => $date, 'format' => 'original', 'serialize' => '0') ); diff --git a/plugins/CustomVariables/config/config.php b/plugins/CustomVariables/config/config.php index 82a0058e02..027d40d575 100644 --- a/plugins/CustomVariables/config/config.php +++ b/plugins/CustomVariables/config/config.php @@ -1,9 +1,11 @@ <?php return array( - 'tracker.request.processors' => DI\add(array( DI\get('Piwik\Plugins\CustomVariables\Tracker\CustomVariablesRequestProcessor'), )), + // in tests we do not use 'today' to make tests results deterministic + 'CustomVariables.today' => 'today', + ); |