From 78b7582b8d002e731f18a215b7f4331c57008f4e Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 21 Dec 2015 22:40:11 +0000 Subject: [PATCH] Prevent tests breaking due to rolling into the next second --- tests/Api/MetricPointTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Api/MetricPointTest.php b/tests/Api/MetricPointTest.php index fcfa0e03..5fbeaac2 100644 --- a/tests/Api/MetricPointTest.php +++ b/tests/Api/MetricPointTest.php @@ -83,6 +83,9 @@ class MetricPointTest extends AbstractApiTestCase $this->beUser(); + // prevent tests breaking due to rolling into the next second + Carbon::setTestNow(Carbon::now()); + $timezone = 'America/Mexico_City'; $metric = factory('CachetHQ\Cachet\Models\Metric')->create(); $timestamp = Carbon::now()->timezone($timezone)->timestamp;