-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support for multiple arguments #5462
Support for multiple arguments #5462
Conversation
PHPUnit 9 is closed for changes other than bug fixes and adaptions to new versions of PHP. |
Codecov Report
@@ Coverage Diff @@
## main #5462 +/- ##
============================================
+ Coverage 87.06% 87.07% +0.01%
- Complexity 6205 6211 +6
============================================
Files 662 662
Lines 19858 19874 +16
============================================
+ Hits 17290 17306 +16
Misses 2568 2568
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thank you for the reply and to take into consideration this work. I applied the CSFixer rules, sorry about that. I was wondering how to tell to psalm that I tried several solutions to avoid that MissingThrowsDocblock, but I'm not able to fix it yet even if I add I don't understand why this issue didn't appear before my changes |
@sebastianbergmann do you have any ideas on how to satisfy psalm in this case? |
I do not have time to look into this right now. |
6cef786
to
3815387
Compare
@sebastianbergmann this is ready to be checked again. psalm issue should be fixed. Thank you |
$argument, | ||
$configuration->testSuffixes(), | ||
); | ||
$testSuite = count($arguments) === 1 |
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.
Please do not use the ternary operator here.
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.
splitted using a more readable if-else.
As of 51f93ba, the name of the top-level test suite that is created when a directory or file path is passed as an argument to the test runner is now always |
Thank you for patience. I did not like the |
Adapted the code with your main to use the new cliArguments methods.
but I can see that your pipeline is working on the main, so I think is an issue only on my laptop. |
This branch cannot be rebased due to conflicts. |
7305a82
to
ba75b2a
Compare
Hi @sebastianbergmann, I squashed all the commits and rebased the branch. |
ba75b2a
to
1b9b138
Compare
This work adds the support for providing multiple files or directories as arguments to PHPUnit:
It is very useful when you want to test multiple things together without having a Suite defined in the configuration, and most important (for me) is that it works for CircleCI's parallelisation command (apparently phpunit is one of the few test frameworks without this feature).
It could be easily extended for phpunit9.
Point to discuss