Prevent tests breaking due to rolling into the next second

This commit is contained in:
Graham Campbell
2015-12-21 22:40:11 +00:00
parent 2e48fe919a
commit 78b7582b8d

View File

@@ -83,6 +83,9 @@ class MetricPointTest extends AbstractApiTestCase
$this->beUser(); $this->beUser();
// prevent tests breaking due to rolling into the next second
Carbon::setTestNow(Carbon::now());
$timezone = 'America/Mexico_City'; $timezone = 'America/Mexico_City';
$metric = factory('CachetHQ\Cachet\Models\Metric')->create(); $metric = factory('CachetHQ\Cachet\Models\Metric')->create();
$timestamp = Carbon::now()->timezone($timezone)->timestamp; $timestamp = Carbon::now()->timezone($timezone)->timestamp;