Skip to content

Conversation

@Rello
Copy link
Owner

@Rello Rello commented Dec 27, 2025

Motivation

  • Make testReplaceFilterVariables deterministic by defining expected options and values per case instead of deriving them via reflection.
  • Improve clarity of test cases for multiple %...% filter patterns and formats.
  • Avoid depending on private method invocations in tests by calculating expected timestamps locally.

Description

  • Replace reflection-based parsing in tests/Service/VariableServiceTest.php with a data provider replaceFilterVariablesProvider that supplies explicit expected options and values.
  • Add local helper methods expectedStartTimestamp and expectedQuarterRange to compute expected timestamps and quarter ranges for provider cases.
  • Update testReplaceFilterVariables signature to accept the expected option and expected value and assert the service output against those values.
  • Add a one-line entry to CHANGELOG.md documenting the extended filter variable replacement tests.

Testing

  • No automated tests were executed as part of this change.
  • The modified test file is tests/Service/VariableServiceTest.php and can be run with vendor/bin/phpunit tests/Service/VariableServiceTest.php if desired.

Codex Task

@Rello Rello merged commit 3c3fca6 into master Dec 27, 2025
1 check passed
@Rello Rello deleted the codex/enhance-tests-for-testreplacefiltervariables branch December 27, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants