From 5a5d84268bc00bc108f1810954090db28984b8d9 Mon Sep 17 00:00:00 2001 From: Norby Baruani Date: Sun, 16 Jun 2024 13:14:19 +0200 Subject: [PATCH] freeze time --- tests/MakeCommandTestCase.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/MakeCommandTestCase.php b/tests/MakeCommandTestCase.php index 727e89e..60a6573 100644 --- a/tests/MakeCommandTestCase.php +++ b/tests/MakeCommandTestCase.php @@ -2,10 +2,18 @@ namespace NorbyBaru\Modularize\Tests; +use Illuminate\Support\Carbon; + abstract class MakeCommandTestCase extends TestCase { public string $moduleName = 'Blog'; + public function setup(): void + { + Carbon::setTestNow(testNow: Carbon::now()); + parent::setUp(); + } + public function teardown(): void { $this->cleanUp();