test(rtt) : add computus edge-case years and Monday guard for SolidarityDayResolver

This commit is contained in:
2026-06-11 10:26:39 +02:00
parent d8fb79e5cc
commit acec08cac1
@@ -35,5 +35,29 @@ final class SolidarityDayResolverTest extends TestCase
yield '2025' => [2025, '2025-06-09'];
yield '2026' => [2026, '2026-05-25'];
// Century-boundary year: Easter 2000-04-23 → Whit Monday 2000-06-12
// (verified with: easter_date(2000) → date('+50 days'))
yield '2000' => [2000, '2000-06-12'];
// Late-April Easter (2011-04-24) → Whit Monday 2011-06-13
// (verified with: easter_date(2011) → date('+50 days'))
yield '2011' => [2011, '2011-06-13'];
// Easter on April 25 — exercises the computus corrective $m branch:
// Easter 2038-04-25 → Whit Monday 2038-06-14
// (verified with: easter_date(2038) → date('+50 days'))
yield '2038' => [2038, '2038-06-14'];
}
/**
* The returned date must always be a Monday (ISO weekday = 1).
* Verified for 2025 as a representative case.
*/
public function testPentecostMondayIsAMonday(): void
{
$resolver = new SolidarityDayResolver();
self::assertSame('1', $resolver->pentecostMonday(2025)->format('N'));
}
}