Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Core Tests: have a check for duplicate markers in inc files #773

Open
jrfnl opened this issue Dec 16, 2024 · 1 comment · May be fixed by #777
Open

Core Tests: have a check for duplicate markers in inc files #773

jrfnl opened this issue Dec 16, 2024 · 1 comment · May be fixed by #777

Comments

@jrfnl
Copy link
Member

jrfnl commented Dec 16, 2024

A number of tests in the Core test directory identify a specific token via a /* testMarker */ like comment in the inc file(s).

When the test case file inc gets larger, it is quite easy to accidentally have a duplicate "test marker" comment in the file (non unique name) and the test would end up not testing what it should be testing and this would go unnoticed.

It would be good to have a minimal test - probably with a helper function running the actual test code in the AbstractMethodUnitTest class - to verify that an inc file doesn't contain duplicate test markers.

This would be a QA check on the tests, but can be run as a test itself.

@jrfnl
Copy link
Member Author

jrfnl commented Dec 16, 2024

Note: probably also good to have this available via PHPCSUtils as well.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant