File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
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
@@ -49,15 +50,14 @@ public function testCarbonImmutableCompatibility()
49
50
50
51
public function testItCanTravelByMicroseconds ()
51
52
{
52
- Date::use (CarbonImmutable::class);
53
- Date::setTestNow (Date::parse ('2000-01-01 00:00:00 ' )->startOfSecond ());
53
+ Carbon::setTestNow (Carbon::parse ('2000-01-01 00:00:00 ' )->startOfSecond ());
54
54
55
55
(new Wormhole (1 ))->microsecond ();
56
56
$ this ->assertSame ('2000-01-01 00:00:00.000001 ' , Date::now ()->format ('Y-m-d H:i:s.u ' ));
57
57
58
58
(new Wormhole (5 ))->microseconds ();
59
59
$ this ->assertSame ('2000-01-01 00:00:00.000006 ' , Date::now ()->format ('Y-m-d H:i:s.u ' ));
60
60
61
- Date:: useDefault ();
61
+ Carbon:: setTestnow ();
62
62
}
63
63
}
You can’t perform that action at this time.
0 commit comments