-
Notifications
You must be signed in to change notification settings - Fork 60
Detect Test Attribute in TestsNodeAnalyzer::isTestClassMethod #486
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
Conversation
Please run
to fix ci, also, please add fixture test |
Sure thing. Will do that at home. There I can properly git clone the project (instead of working in github editor) |
fixture test added and ran
|
You possibly have issue with composer update/install, you can see troubleshooting vendor patch here https://github.com/symplify/vendor-patches/?tab=readme-ov-file#troubleshooting for windows, you may need to add Git usr directory to path |
That did the trick. thanks! Changes submitted First time I saw vendor-patches in action, so it looked interactive to apply (pressing 'enter' to apply). But in reality, it didn't do anything :) Is there a way to detect this problem so vendor-patches shows information on why it might hang? |
Could you add fixture to existing rules tests in this package that using the method instead of add new test class? Thank you |
Sure, can you point me in the right direction? Because I didn't find a test for this rule at all |
You can search here, it seems at least 2 rules use of it https://github.com/search?q=repo%3Arectorphp%2Frector-phpunit%20isTestClassMethod&type=code Then, locate fixture under |
Thanks. I was looking for I've added a fixture to
|
Let's give it a try, thank you @Levivb |
The
isTestClassMethod
didn't take phpunit 12#[Test]
Attribute into account. Now it does. Tested in on a project and yielded thousands of updated method signatures spanning over 250 test files. So it seems to work :)It uses the php 8.4
array_any
function. But I think that's going to be downgraded automatically by rector, right?