File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Carbon \CarbonImmutable ;
6
6
use Illuminate \Foundation \Testing \Wormhole ;
7
+ use Illuminate \Support \Carbon ;
7
8
use Illuminate \Support \Facades \Date ;
8
9
use PHPUnit \Framework \TestCase ;
9
10
@@ -53,13 +54,14 @@ public function testCarbonImmutableCompatibility()
53
54
54
55
public function testItCanTravelByMicroseconds ()
55
56
{
56
- Date::use (CarbonImmutable::class);
57
- Date::setTestNow (Date::parse ('2000-01-01 00:00:00 ' )->startOfSecond ());
57
+ Carbon::setTestNow (Carbon::parse ('2000-01-01 00:00:00 ' )->startOfSecond ());
58
58
59
59
(new Wormhole (1 ))->microsecond ();
60
60
$ this ->assertSame ('2000-01-01 00:00:00.000001 ' , Date::now ()->format ('Y-m-d H:i:s.u ' ));
61
61
62
62
(new Wormhole (5 ))->microseconds ();
63
63
$ this ->assertSame ('2000-01-01 00:00:00.000006 ' , Date::now ()->format ('Y-m-d H:i:s.u ' ));
64
+
65
+ Carbon::setTestnow ();
64
66
}
65
67
}
You can’t perform that action at this time.
0 commit comments