From 569150e52464e2f9656e774f1801352c32f3a2a6 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Mon, 14 Oct 2013 00:31:42 +0000 Subject: fix UI test by setting a fixed end date, otherwise we have to update the screenshot all the time --- plugins/ExampleUI/API.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/ExampleUI') 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) { -- cgit v1.2.3