From c9cc18001e0dd14638320a4a770bbc2486fc9eef Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 11 Apr 2024 16:34:08 +0200 Subject: [PATCH] wip --- tests/Database/QueryDurationThresholdTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Database/QueryDurationThresholdTest.php b/tests/Database/QueryDurationThresholdTest.php index 2e47ecca1622..ddcba33a3e90 100644 --- a/tests/Database/QueryDurationThresholdTest.php +++ b/tests/Database/QueryDurationThresholdTest.php @@ -17,6 +17,13 @@ class QueryDurationThresholdTest extends TestCase */ protected $now; + protected function tearDown(): void + { + Carbon::setTestNow(null); + + parent::tearDown(); + } + public function testItCanHandleReachingADurationThresholdInTheDb() { $connection = new Connection(new PDO('sqlite::memory:')); @@ -66,8 +73,6 @@ public function testItIsOnlyCalledOnceWhenGivenDateTime() $connection->logQuery('xxxx', [], 1); $this->assertSame(1, $called); - - Carbon::setTestNow(null); } public function testItCanSpecifyMultipleHandlersWithTheSameIntervals()