Skip to content

Commit 21b1fd5

Browse files
CopilotKevinrob
andcommitted
Remove framework testing method from DST transition tests
Remove testUtcTimestampApproachIsConsistentAcrossTimezones method as it tests PHP's DateTime behavior rather than our cache middleware logic. Keep the tests that actually verify our CacheEntry implementation. Co-authored-by: Kevinrob <4509277+Kevinrob@users.noreply.github.com>
1 parent fa030f3 commit 21b1fd5

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

tests/DstTransitionTest.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,6 @@ protected function tearDown(): void
2929
date_default_timezone_set($this->originalTimezone);
3030
}
3131

32-
/**
33-
* Test that UTC timestamp approach provides consistent behavior
34-
* This verifies that our fix using '@' . (time() - 1) always creates
35-
* expired timestamps regardless of timezone.
36-
*/
37-
public function testUtcTimestampApproachIsConsistentAcrossTimezones()
38-
{
39-
$timezones = ['UTC', 'Europe/Berlin', 'America/New_York', 'Asia/Tokyo'];
40-
41-
foreach ($timezones as $timezone) {
42-
date_default_timezone_set($timezone);
43-
44-
// Create DateTime using UTC timestamp (the fix)
45-
$utcDateTime = new \DateTime('@' . (time() - 1));
46-
47-
// Calculate TTL as the CacheEntry does
48-
$ttl = $utcDateTime->getTimestamp() - time();
49-
50-
// This should always be negative (approximately -1)
51-
$this->assertLessThanOrEqual(0, $ttl, "TTL should be negative in timezone: $timezone");
52-
$this->assertGreaterThanOrEqual(-2, $ttl, "TTL should not be too negative in timezone: $timezone");
53-
}
54-
}
55-
5632
/**
5733
* Test CacheEntry behavior with UTC timestamp approach
5834
* This ensures that cache entries marked for immediate expiry

0 commit comments

Comments
 (0)