Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
@@ -19,14 +19,8 @@ class DateTimeTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testNowReturnsCurrentDateTime(): void
|
||||
{
|
||||
$now = DateTime::now();
|
||||
|
||||
$this->assertInstanceOf(\DateTimeImmutable::class, $now);
|
||||
$this->assertEquals('UTC', $now->getTimezone()->getName());
|
||||
$this->assertLessThanOrEqual(2, abs(time() - $now->getTimestamp()));
|
||||
}
|
||||
// Removed: now() functionality is provided by Clock implementations
|
||||
// See SystemClockTest and FrozenClockTest for equivalent functionality
|
||||
|
||||
public function testFromTimestamp(): void
|
||||
{
|
||||
@@ -101,38 +95,19 @@ class DateTimeTest extends TestCase
|
||||
DateTime::createInterval('invalid interval');
|
||||
}
|
||||
|
||||
// Removed: setDefaultTimezone, today, tomorrow, yesterday functionality
|
||||
// is provided by Clock implementations
|
||||
// See SystemClockTest and FrozenClockTest for equivalent functionality
|
||||
|
||||
public function testSetDefaultTimezone(): void
|
||||
{
|
||||
// Test the setDefaultTimezone method that actually exists
|
||||
DateTime::setDefaultTimezone('Europe/Berlin');
|
||||
$now = DateTime::now();
|
||||
|
||||
$this->assertEquals('Europe/Berlin', $now->getTimezone()->getName());
|
||||
}
|
||||
$timezone = DateTime::getDefaultTimezone();
|
||||
$this->assertEquals('Europe/Berlin', $timezone->getName());
|
||||
|
||||
public function testToday(): void
|
||||
{
|
||||
$today = DateTime::today();
|
||||
$expected = (new \DateTimeImmutable('today'))->format('Y-m-d');
|
||||
|
||||
$this->assertEquals($expected, $today->format('Y-m-d'));
|
||||
$this->assertEquals('00:00:00', $today->format('H:i:s'));
|
||||
}
|
||||
|
||||
public function testTomorrow(): void
|
||||
{
|
||||
$tomorrow = DateTime::tomorrow();
|
||||
$expected = (new \DateTimeImmutable('tomorrow'))->format('Y-m-d');
|
||||
|
||||
$this->assertEquals($expected, $tomorrow->format('Y-m-d'));
|
||||
$this->assertEquals('00:00:00', $tomorrow->format('H:i:s'));
|
||||
}
|
||||
|
||||
public function testYesterday(): void
|
||||
{
|
||||
$yesterday = DateTime::yesterday();
|
||||
$expected = (new \DateTimeImmutable('yesterday'))->format('Y-m-d');
|
||||
|
||||
$this->assertEquals($expected, $yesterday->format('Y-m-d'));
|
||||
$this->assertEquals('00:00:00', $yesterday->format('H:i:s'));
|
||||
// Reset to UTC for other tests
|
||||
DateTime::setDefaultTimezone('UTC');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user