-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
allow-underscore-test for CamelCaseMethod gives unexpected results #851
Comments
Hello,
Please provide a minimal way to reproduce your error. |
The PHPDoc code you mention is about forbidding multiple underscores, but |
I misinterpreted the documentation in the unit test I think.... Do you mean a method name like I did some more research but it really isn't working ;) You can test this yourself by changing the file The test will fail if you use the method name My
Furthermore in the test |
Current Behavior
Currently when the property
allow-underscore-test
is set to true for theCamelCaseMethod
rule, method names liketest_that_something_is_ok
are not accepted while documentation says "Is it allowed to have underscores in test method names."Changing the regex in the rule to
/^test[a-zA-Z0-9]*([_][a-z][a-zA-Z0-9]*)*?$/
should fix the problem.Expected behavior
Method like
test_that_something_is_ok
should be allowed as described in documentationAdditional
I could make a PR myself, but in the Unit tests the following is documented:
So I'm not sure what the expected behavior would be?
The text was updated successfully, but these errors were encountered: