Skip to content

Commit 5d3fb4d

Browse files
Reset Date facade to use default in the tearDown method
1 parent 8e534f0 commit 5d3fb4d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/DateTimeImmutableTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ protected function setUp(): void
2020
Anniversary::truncate();
2121
}
2222

23+
protected function tearDown(): void
24+
{
25+
Date::useDefault();
26+
}
27+
2328
public function testCanReturnCarbonImmutableObject(): void
2429
{
2530
Date::use(CarbonImmutable::class);
@@ -32,7 +37,5 @@ public function testCanReturnCarbonImmutableObject(): void
3237
$anniversary = Anniversary::sole();
3338
assert($anniversary instanceof Anniversary);
3439
self::assertInstanceOf(CarbonImmutable::class, $anniversary->anniversary);
35-
36-
Date::useDefault();
3740
}
3841
}

0 commit comments

Comments
 (0)