diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-10-14 04:31:42 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-10-14 04:31:42 +0400 |
commit | 569150e52464e2f9656e774f1801352c32f3a2a6 (patch) | |
tree | 4ac065263c1d4d40397762483a6044c4c6d9276a /plugins | |
parent | 9acbf3fa5270d413f7491ec2b9449c184d7f0026 (diff) |
fix UI test by setting a fixed end date, otherwise we have to update the screenshot all the time
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ExampleUI/API.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/ExampleUI/API.php b/plugins/ExampleUI/API.php index 681e2afb4b..67f1f1d79a 100644 --- a/plugins/ExampleUI/API.php +++ b/plugins/ExampleUI/API.php @@ -11,6 +11,7 @@ namespace Piwik\Plugins\ExampleUI; use Piwik\DataTable; +use Piwik\Date; use Piwik\Period\Range; /** @@ -28,7 +29,10 @@ class API extends \Piwik\Plugin\API public function getTemperaturesEvolution($date, $period) { $temperatures = array(); + + $date = Date::factory('2013-10-10', 'UTC'); $period = new Range($period, 'last30'); + $period->setDefaultEndDate($date); foreach ($period->getSubperiods() as $subPeriod) { if (self::$disableRandomness) { |