[BUGFIX] Handle roll-over of dates in `RotatingFileWriterTest`
In the test class `RotatingFileWriterTest`, the `MONTHLY` and `YEARLY` cases for `writingLogWithExpiredLatestRotationInTimeFrameRotates` may fail as it tries to create a mock file that needs rotation with a broken date. It is expected to create a file with a date of the previous period that's tested. However, at the end of uneven months or each Feb. 29th this will heavily fail due to PHP's automatic roll-over to the next valid date. We'd need a fallback to the latest valid date here. The aforementioned test now has a special handling in place in case either `MONTHLY` or `YEARLY` are tested – the date is modified to go back to the first day of the respective period and then either set the current day OR the latest days in that period, whatever fits. Resolves: #103509 Releases: main Change-Id: Ic60c3056ed31933ff7be3af196ba08ed92f04855 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83630 Reviewed-by:Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de>
Please register or sign in to comment