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 using duration for the --order-by option as well as for the executionOrder attribute in phpunit.xml #3682
Allow using duration for the --order-by option as well as for the executionOrder attribute in phpunit.xml #3682
Conversation
a94016c
to
b4c9c01
Compare
Codecov Report
@@ Coverage Diff @@
## master #3682 +/- ##
=========================================
Coverage 83.08% 83.08%
Complexity 3716 3716
=========================================
Files 143 143
Lines 9779 9779
=========================================
Hits 8125 8125
Misses 1654 1654
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3682 +/- ##
===========================================
+ Coverage 83.09% 83.1% +0.01%
- Complexity 3717 3719 +2
===========================================
Files 143 143
Lines 9785 9791 +6
===========================================
+ Hits 8131 8137 +6
Misses 1654 1654
Continue to review full report at Codecov.
|
d948d10
to
14daebe
Compare
IMO, this is not a bugfix but new functionality. Can you please make this pull request against the |
src/TextUI/Help.php
Outdated
@@ -100,7 +100,7 @@ final class Help | |||
['arg' => '--printer <printer>', 'desc' => 'TestListener implementation to use'], | |||
['spacer' => ''], | |||
|
|||
['arg' => '--order-by=<order>', 'desc' => 'Run tests in order: default|reverse|random|defects|no-depends'], | |||
['arg' => '--order-by=<order>', 'desc' => 'Run tests in order: default|reverse|random|defects|no-depends|duration'], |
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.
Do you have any preferences in regard to the order
- in which the options are listed in the help output
- in which the options are handled in the
switch
-statement
?
Personally, I would probably keep them sorted like this
default
first- everything else alphabetically
If you like this, I will adjust!
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.
I like :)
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.
Nice addition :)
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.
Thanks, adjusted!
Adjusted and pointing against |
@sebastianbergmann @epdenouden Just noticed that we are apparently not handling the |
Are you saying that currently neither CLI option nor configuration directive exists to control duration sorting? If so, yes please. |
Already done! 😉 |
Thanks! |
Thank you, @sebastianbergmann! |
@epdenouden @sebastianbergmann I have been wondering, perhaps the That is, one could sort tests by
and then What do you think? |
This PR
duration
as value for theorder-by
option via CLI as well as for theexecutionOrder
attribute inphpunit.xml
Fixes #3681.
Also see sebastianbergmann/phpunit-documentation-english#143.