-
-
Notifications
You must be signed in to change notification settings - Fork 89
Generic/DisallowShortOpenTag: improve code coverage #638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic/DisallowShortOpenTag: improve code coverage #638
Conversation
src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc
Outdated
Show resolved
Hide resolved
@jrfnl, while checking your suggestion for the snippet clipping test (#638 (comment)), I noticed that the test to ensure that close tags are recognized as such only if placed after the open tag needs to be the last test on the file, as there should be no close tag after the open tag: PHP_CodeSniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc Lines 18 to 19 in 856fa77
I wonder if we should indicate that in the code comment above it or if this test should be moved to its own file? |
Adding a code comment would be good. As it's not a parse error, I don't think this needs a separate test file. |
Ok, I just added a comment documenting that the test must be the last one in the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add extra tests to improve code coverage * Add comment to last test in case file 3 to clarify that it must be the last in the file.
Description
This PR improves code coverage for the
Generic.PHP.DisallowShortOpenTag
sniff.Related issues/external references
Part of #146
Types of changes
PR checklist