-
-
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 --group in --list-tests #5703
Conversation
foreach (new RecursiveIteratorIterator($this->suite) as $test) { | ||
if ($test instanceof TestCase) { | ||
if (!$this->testContainsConfiguredGroups($test, $configuredGroups)) { |
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.
should a PhptTestCase
be skipped when groups are passed via CLI flags, since a PhptTestCase
cannot define a group (AFAICT) ?
I would skip them - do you agree?
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5703 +/- ##
============================================
+ Coverage 89.94% 89.96% +0.02%
- Complexity 6460 6474 +14
============================================
Files 684 684
Lines 19618 19650 +32
============================================
+ Hits 17645 17679 +34
+ Misses 1973 1971 -2 ☔ View full report in Codecov by Sentry. |
I wrote down my thoughts on the proposed change in #5702 (comment) and will only comment on the currently proposed implementation here. If we change options such as After d2003b6, this (c|sh)ould be a simple as diff --git a/src/TextUI/Application.php b/src/TextUI/Application.php
index 2bf6d3c78..5f2c8bb31 100644
--- a/src/TextUI/Application.php
+++ b/src/TextUI/Application.php
@@ -37,6 +37,7 @@
use PHPUnit\Runner\Extension\ExtensionBootstrapper;
use PHPUnit\Runner\Extension\Facade as ExtensionFacade;
use PHPUnit\Runner\Extension\PharLoader;
+use PHPUnit\Runner\Filter\Factory;
use PHPUnit\Runner\GarbageCollection\GarbageCollectionHandler;
use PHPUnit\Runner\ResultCache\DefaultResultCache;
use PHPUnit\Runner\ResultCache\NullResultCache;
@@ -416,6 +417,8 @@ private function executeCommandsThatDoNotRequireTheTestSuite(Configuration $conf
private function executeCommandsThatRequireTheTestSuite(Configuration $configuration, CliConfiguration $cliConfiguration, TestSuite $testSuite): void
{
+ (new TestSuiteFilterProcessor(new Factory))->process($configuration, $testSuite);
+
if ($cliConfiguration->listGroups()) {
$this->execute(new ListGroupsCommand($testSuite));
} |
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it. |
Alas, it is not: #5720 (comment). But I'm working on it :) |
early submit to get some functional questions answered. I will cleanup CS and type-checker after we have the same idea how the feature should work
closes #5702