Skip to content

Fix flaky date tests comparing two separate time() calls#60

Merged
Progi1984 merged 1 commit into
PHPOffice:developfrom
slayerfx:fix/flaky-date-tests
Jul 20, 2026
Merged

Fix flaky date tests comparing two separate time() calls#60
Progi1984 merged 1 commit into
PHPOffice:developfrom
slayerfx:fix/flaky-date-tests

Conversation

@slayerfx

@slayerfx slayerfx commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

The argument-less date setters call time() internally, while the tests captured their own time() beforehand and compared both with assertEquals failing whenever the second changed between the two calls (turned the CI red on #56). The date is now asserted against a [before, after] range instead.

@slayerfx
slayerfx force-pushed the fix/flaky-date-tests branch from d654827 to 1e14ad4 Compare July 20, 2026 13:49
@Progi1984 Progi1984 added this to the 0.3.0 milestone Jul 20, 2026
@Progi1984
Progi1984 merged commit 627e5ab into PHPOffice:develop Jul 20, 2026
28 checks passed
@slayerfx
slayerfx deleted the fix/flaky-date-tests branch July 21, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants