File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ public function __construct(array $config)
3737 {
3838 parent ::__construct ($ config );
3939
40- Time::setTestNow ('2023-11-25 12:00:00 ' );
41-
4240 $ this ->handles = $ config ['handles ' ] ?? [];
4341 $ this ->destination = $ this ->path . 'log- ' . Time::now ()->format ('Y-m-d ' ) . '. ' . $ this ->fileExtension ;
4442
@@ -56,9 +54,7 @@ public function __construct(array $config)
5654 */
5755 public function handle ($ level , $ message ): bool
5856 {
59- Time::setTestNow ('2023-11-25 12:00:00 ' );
60-
61- $ date = Time::now ()->format ('Y-m-d ' );
57+ $ date = Time::now ()->format ($ this ->dateFormat );
6258
6359 self ::$ logs [] = strtoupper ($ level ) . ' - ' . $ date . ' --> ' . $ message ;
6460
Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ protected function setUp(): void
3333 Services::injectMock ('logger ' , new Logger (new LoggerConfig ()));
3434 }
3535
36+ protected function tearDown (): void
37+ {
38+ parent ::tearDown ();
39+
40+ // Reset the current time.
41+ Time::setTestNow ();
42+ }
43+
3644 public function testResponse (): void
3745 {
3846 $ response = (new RedirectException (
You can’t perform that action at this time.
0 commit comments